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

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

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

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

import com.pulumi.azurenative.machinelearningservices.inputs.CustomServiceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
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

/**
 * Specifies the custom service configuration
 * @property docker Describes the docker settings for the image
 * @property endpoints Configuring the endpoints for the container
 * @property environmentVariables Environment Variable for the container
 * @property image Describes the Image Specifications
 * @property name Name of the Custom Service
 * @property volumes Configuring the volumes for the container
 */
public data class CustomServiceArgs(
    public val docker: Output? = null,
    public val endpoints: Output>? = null,
    public val environmentVariables: Output>? = null,
    public val image: Output? = null,
    public val name: Output? = null,
    public val volumes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.CustomServiceArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.CustomServiceArgs.builder()
            .docker(docker?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .endpoints(
                endpoints?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .image(image?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .volumes(
                volumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [CustomServiceArgs].
 */
@PulumiTagMarker
public class CustomServiceArgsBuilder internal constructor() {
    private var docker: Output? = null

    private var endpoints: Output>? = null

    private var environmentVariables: Output>? = null

    private var image: Output? = null

    private var name: Output? = null

    private var volumes: Output>? = null

    /**
     * @param value Describes the docker settings for the image
     */
    @JvmName("bibkqryggsdxqbtw")
    public suspend fun docker(`value`: Output) {
        this.docker = value
    }

    /**
     * @param value Configuring the endpoints for the container
     */
    @JvmName("jnddgoaxhqwkyiom")
    public suspend fun endpoints(`value`: Output>) {
        this.endpoints = value
    }

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

    /**
     * @param values Configuring the endpoints for the container
     */
    @JvmName("crcligbenseqxayr")
    public suspend fun endpoints(values: List>) {
        this.endpoints = Output.all(values)
    }

    /**
     * @param value Environment Variable for the container
     */
    @JvmName("wrkxuyylroyoytaa")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value Describes the Image Specifications
     */
    @JvmName("pxwhmqjkqvoomhyi")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Name of the Custom Service
     */
    @JvmName("ppagfjobtmnrxgpw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Configuring the volumes for the container
     */
    @JvmName("ewntjjehaymgbdpf")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values Configuring the volumes for the container
     */
    @JvmName("fqjxwamcaqmcxhdi")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value Describes the docker settings for the image
     */
    @JvmName("fccjmwylaolrnjja")
    public suspend fun docker(`value`: DockerArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.docker = mapped
    }

    /**
     * @param argument Describes the docker settings for the image
     */
    @JvmName("uysdfhhgvfeicxmb")
    public suspend fun docker(argument: suspend DockerArgsBuilder.() -> Unit) {
        val toBeMapped = DockerArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.docker = mapped
    }

    /**
     * @param value Configuring the endpoints for the container
     */
    @JvmName("hmppifdtjotifecd")
    public suspend fun endpoints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpoints = mapped
    }

    /**
     * @param argument Configuring the endpoints for the container
     */
    @JvmName("odysenhoiroobebh")
    public suspend fun endpoints(argument: List Unit>) {
        val toBeMapped = argument.toList().map { EndpointArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.endpoints = mapped
    }

    /**
     * @param argument Configuring the endpoints for the container
     */
    @JvmName("gspjmustawyrftee")
    public suspend fun endpoints(vararg argument: suspend EndpointArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { EndpointArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.endpoints = mapped
    }

    /**
     * @param argument Configuring the endpoints for the container
     */
    @JvmName("pdmdofonfevoheub")
    public suspend fun endpoints(argument: suspend EndpointArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EndpointArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.endpoints = mapped
    }

    /**
     * @param values Configuring the endpoints for the container
     */
    @JvmName("swenggnbfndmlrdo")
    public suspend fun endpoints(vararg values: EndpointArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.endpoints = mapped
    }

    /**
     * @param value Environment Variable for the container
     */
    @JvmName("utoiiwibrdluatiq")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param argument Environment Variable for the container
     */
    @JvmName("lddcddrokldcbfiu")
    public suspend fun environmentVariables(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                EnvironmentVariableArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param values Environment Variable for the container
     */
    @JvmName("hbdrvacrifbcsakv")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value Describes the Image Specifications
     */
    @JvmName("aoefqiuspajbiqfw")
    public suspend fun image(`value`: ImageArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param argument Describes the Image Specifications
     */
    @JvmName("jtfnkcfevkvtdyfu")
    public suspend fun image(argument: suspend ImageArgsBuilder.() -> Unit) {
        val toBeMapped = ImageArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.image = mapped
    }

    /**
     * @param value Name of the Custom Service
     */
    @JvmName("ymhlrihiyqlibogq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Configuring the volumes for the container
     */
    @JvmName("thmdcwftikonfsca")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument Configuring the volumes for the container
     */
    @JvmName("xchibvwunkjfmrgt")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VolumeDefinitionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Configuring the volumes for the container
     */
    @JvmName("jnumhbwbtqdhtnlj")
    public suspend fun volumes(vararg argument: suspend VolumeDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VolumeDefinitionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Configuring the volumes for the container
     */
    @JvmName("tyhifomacavyjhjy")
    public suspend fun volumes(argument: suspend VolumeDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VolumeDefinitionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values Configuring the volumes for the container
     */
    @JvmName("eiubssacwxcjehly")
    public suspend fun volumes(vararg values: VolumeDefinitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    internal fun build(): CustomServiceArgs = CustomServiceArgs(
        docker = docker,
        endpoints = endpoints,
        environmentVariables = environmentVariables,
        image = image,
        name = name,
        volumes = volumes,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy