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

com.pulumi.azurenative.machinelearning.kotlin.inputs.AssetItemArgs.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.machinelearning.kotlin.inputs

import com.pulumi.azurenative.machinelearning.inputs.AssetItemArgs.builder
import com.pulumi.azurenative.machinelearning.kotlin.enums.AssetType
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 com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Information about an asset associated with the web service.
 * @property id Asset's Id.
 * @property inputPorts Information about the asset's input ports.
 * @property locationInfo Access information for the asset.
 * @property metadata If the asset is a custom module, this holds the module's metadata.
 * @property name Asset's friendly name.
 * @property outputPorts Information about the asset's output ports.
 * @property parameters If the asset is a custom module, this holds the module's parameters.
 * @property type Asset's type.
 */
public data class AssetItemArgs(
    public val id: Output? = null,
    public val inputPorts: Output>? = null,
    public val locationInfo: Output,
    public val metadata: Output>? = null,
    public val name: Output,
    public val outputPorts: Output>? = null,
    public val parameters: Output>? = null,
    public val type: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearning.inputs.AssetItemArgs =
        com.pulumi.azurenative.machinelearning.inputs.AssetItemArgs.builder()
            .id(id?.applyValue({ args0 -> args0 }))
            .inputPorts(
                inputPorts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .locationInfo(locationInfo.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .outputPorts(
                outputPorts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .type(
                type.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AssetItemArgs].
 */
@PulumiTagMarker
public class AssetItemArgsBuilder internal constructor() {
    private var id: Output? = null

    private var inputPorts: Output>? = null

    private var locationInfo: Output? = null

    private var metadata: Output>? = null

    private var name: Output? = null

    private var outputPorts: Output>? = null

    private var parameters: Output>? = null

    private var type: Output>? = null

    /**
     * @param value Asset's Id.
     */
    @JvmName("kkjroixukpxicnao")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value Information about the asset's input ports.
     */
    @JvmName("ajiqgtyqaihldwxs")
    public suspend fun inputPorts(`value`: Output>) {
        this.inputPorts = value
    }

    /**
     * @param value Access information for the asset.
     */
    @JvmName("ahpggrkjyhvjgdfc")
    public suspend fun locationInfo(`value`: Output) {
        this.locationInfo = value
    }

    /**
     * @param value If the asset is a custom module, this holds the module's metadata.
     */
    @JvmName("bpyvsfwsglqprjab")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value Asset's friendly name.
     */
    @JvmName("mujmngsvbustdloo")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Information about the asset's output ports.
     */
    @JvmName("rhkptmapcsckpnyj")
    public suspend fun outputPorts(`value`: Output>) {
        this.outputPorts = value
    }

    /**
     * @param value If the asset is a custom module, this holds the module's parameters.
     */
    @JvmName("fnxbipypynsfkykb")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    @JvmName("xrsvgdfranguhjhr")
    public suspend fun parameters(vararg values: Output) {
        this.parameters = Output.all(values.asList())
    }

    /**
     * @param values If the asset is a custom module, this holds the module's parameters.
     */
    @JvmName("iueiubquiwfdncwy")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value Asset's type.
     */
    @JvmName("mlysxqdwbdexjgon")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value Asset's Id.
     */
    @JvmName("mmbnqrauwgwnbqph")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value Information about the asset's input ports.
     */
    @JvmName("eqfbfgehrywtkrlj")
    public suspend fun inputPorts(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inputPorts = mapped
    }

    /**
     * @param argument Information about the asset's input ports.
     */
    @JvmName("pfhybkhcssiisrkn")
    public suspend fun inputPorts(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                InputPortArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.inputPorts = mapped
    }

    /**
     * @param values Information about the asset's input ports.
     */
    @JvmName("jtgpgkbeqochldtb")
    public fun inputPorts(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inputPorts = mapped
    }

    /**
     * @param value Access information for the asset.
     */
    @JvmName("yqsdctyqhxiohoav")
    public suspend fun locationInfo(`value`: BlobLocationArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.locationInfo = mapped
    }

    /**
     * @param argument Access information for the asset.
     */
    @JvmName("tcytenvbyhwybois")
    public suspend fun locationInfo(argument: suspend BlobLocationArgsBuilder.() -> Unit) {
        val toBeMapped = BlobLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.locationInfo = mapped
    }

    /**
     * @param value If the asset is a custom module, this holds the module's metadata.
     */
    @JvmName("tlwtqkmbcogcckqx")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values If the asset is a custom module, this holds the module's metadata.
     */
    @JvmName("kuydgemlhidrqugp")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value Asset's friendly name.
     */
    @JvmName("jfkcguhlbjasfrqu")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Information about the asset's output ports.
     */
    @JvmName("ybdoicajgpkqubbo")
    public suspend fun outputPorts(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputPorts = mapped
    }

    /**
     * @param argument Information about the asset's output ports.
     */
    @JvmName("wcvioqrjgtslkmcx")
    public suspend fun outputPorts(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                OutputPortArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.outputPorts = mapped
    }

    /**
     * @param values Information about the asset's output ports.
     */
    @JvmName("nmyberxrjpghhwtc")
    public fun outputPorts(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.outputPorts = mapped
    }

    /**
     * @param value If the asset is a custom module, this holds the module's parameters.
     */
    @JvmName("evpwkksorkwdoacm")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument If the asset is a custom module, this holds the module's parameters.
     */
    @JvmName("gnjqgnrfwmnoykji")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ModuleAssetParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument If the asset is a custom module, this holds the module's parameters.
     */
    @JvmName("txgjimavhmrbjtfw")
    public suspend fun parameters(vararg argument: suspend ModuleAssetParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ModuleAssetParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument If the asset is a custom module, this holds the module's parameters.
     */
    @JvmName("jwbvavphbnxtjnnk")
    public suspend fun parameters(argument: suspend ModuleAssetParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ModuleAssetParameterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values If the asset is a custom module, this holds the module's parameters.
     */
    @JvmName("cevdshyitwfnveuu")
    public suspend fun parameters(vararg values: ModuleAssetParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value Asset's type.
     */
    @JvmName("wvnxjrnmxoqvddfy")
    public suspend fun type(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Asset's type.
     */
    @JvmName("fpucnesybdbskyxx")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Asset's type.
     */
    @JvmName("embnvclhkpxsjwgj")
    public fun type(`value`: AssetType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): AssetItemArgs = AssetItemArgs(
        id = id,
        inputPorts = inputPorts,
        locationInfo = locationInfo ?: throw PulumiNullFieldException("locationInfo"),
        metadata = metadata,
        name = name ?: throw PulumiNullFieldException("name"),
        outputPorts = outputPorts,
        parameters = parameters,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy