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

com.pulumi.azure.containerapp.kotlin.inputs.JobTemplateArgs.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.containerapp.kotlin.inputs

import com.pulumi.azure.containerapp.inputs.JobTemplateArgs.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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property containers A `container` block as defined below.
 * @property initContainers A `init_container` block as defined below.
 * @property volumes A `volume` block as defined below.
 */
public data class JobTemplateArgs(
    public val containers: Output>,
    public val initContainers: Output>? = null,
    public val volumes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerapp.inputs.JobTemplateArgs =
        com.pulumi.azure.containerapp.inputs.JobTemplateArgs.builder()
            .containers(
                containers.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .initContainers(
                initContainers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .volumes(
                volumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [JobTemplateArgs].
 */
@PulumiTagMarker
public class JobTemplateArgsBuilder internal constructor() {
    private var containers: Output>? = null

    private var initContainers: Output>? = null

    private var volumes: Output>? = null

    /**
     * @param value A `container` block as defined below.
     */
    @JvmName("khpkgjwydaeggnjq")
    public suspend fun containers(`value`: Output>) {
        this.containers = value
    }

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

    /**
     * @param values A `container` block as defined below.
     */
    @JvmName("gucldwhtjwujadns")
    public suspend fun containers(values: List>) {
        this.containers = Output.all(values)
    }

    /**
     * @param value A `init_container` block as defined below.
     */
    @JvmName("pxvxsmecptxqgjbl")
    public suspend fun initContainers(`value`: Output>) {
        this.initContainers = value
    }

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

    /**
     * @param values A `init_container` block as defined below.
     */
    @JvmName("amjeyjcmoynjqxsw")
    public suspend fun initContainers(values: List>) {
        this.initContainers = Output.all(values)
    }

    /**
     * @param value A `volume` block as defined below.
     */
    @JvmName("dntfdemddlpfqveu")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values A `volume` block as defined below.
     */
    @JvmName("oshixbatfvclgvso")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value A `container` block as defined below.
     */
    @JvmName("uocufvafbpschsnw")
    public suspend fun containers(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param argument A `container` block as defined below.
     */
    @JvmName("gieiurfpeslfroja")
    public suspend
    fun containers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument A `container` block as defined below.
     */
    @JvmName("qhfbqttostixjrsf")
    public suspend fun containers(
        vararg
        argument: suspend JobTemplateContainerArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            JobTemplateContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument A `container` block as defined below.
     */
    @JvmName("goeggfuysrgsoejt")
    public suspend fun containers(argument: suspend JobTemplateContainerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(JobTemplateContainerArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param values A `container` block as defined below.
     */
    @JvmName("kaleedpgbgdugcgg")
    public suspend fun containers(vararg values: JobTemplateContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param value A `init_container` block as defined below.
     */
    @JvmName("bdevmioeyolmfygu")
    public suspend fun initContainers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.initContainers = mapped
    }

    /**
     * @param argument A `init_container` block as defined below.
     */
    @JvmName("gojgxheoxxwbawiv")
    public suspend
    fun initContainers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateInitContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param argument A `init_container` block as defined below.
     */
    @JvmName("cxrhgonqksfsuiak")
    public suspend fun initContainers(
        vararg
        argument: suspend JobTemplateInitContainerArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            JobTemplateInitContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param argument A `init_container` block as defined below.
     */
    @JvmName("ycghgiodriryeugp")
    public suspend
    fun initContainers(argument: suspend JobTemplateInitContainerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobTemplateInitContainerArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param values A `init_container` block as defined below.
     */
    @JvmName("ntiywckulxodpbjr")
    public suspend fun initContainers(vararg values: JobTemplateInitContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.initContainers = mapped
    }

    /**
     * @param value A `volume` block as defined below.
     */
    @JvmName("nfgcokelcjqwvhxm")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument A `volume` block as defined below.
     */
    @JvmName("ptxaaopmcltfgcme")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument A `volume` block as defined below.
     */
    @JvmName("ybnbqjkdqjooobep")
    public suspend fun volumes(vararg argument: suspend JobTemplateVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobTemplateVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument A `volume` block as defined below.
     */
    @JvmName("ksihulrlmjadncdj")
    public suspend fun volumes(argument: suspend JobTemplateVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(JobTemplateVolumeArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values A `volume` block as defined below.
     */
    @JvmName("vxanaasgphiyvnif")
    public suspend fun volumes(vararg values: JobTemplateVolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    internal fun build(): JobTemplateArgs = JobTemplateArgs(
        containers = containers ?: throw PulumiNullFieldException("containers"),
        initContainers = initContainers,
        volumes = volumes,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy