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

com.pulumi.azurenative.containerinstance.kotlin.inputs.InitContainerDefinitionArgs.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.containerinstance.kotlin.inputs

import com.pulumi.azurenative.containerinstance.inputs.InitContainerDefinitionArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The init container definition.
 * @property command The command to execute within the init container in exec form.
 * @property environmentVariables The environment variables to set in the init container.
 * @property image The image of the init container.
 * @property name The name for the init container.
 * @property securityContext The container security properties.
 * @property volumeMounts The volume mounts available to the init container.
 */
public data class InitContainerDefinitionArgs(
    public val command: Output>? = null,
    public val environmentVariables: Output>? = null,
    public val image: Output? = null,
    public val name: Output,
    public val securityContext: Output? = null,
    public val volumeMounts: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.containerinstance.inputs.InitContainerDefinitionArgs = com.pulumi.azurenative.containerinstance.inputs.InitContainerDefinitionArgs.builder()
        .command(command?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .environmentVariables(
            environmentVariables?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .image(image?.applyValue({ args0 -> args0 }))
        .name(name.applyValue({ args0 -> args0 }))
        .securityContext(securityContext?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .volumeMounts(
            volumeMounts?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        ).build()
}

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

    private var environmentVariables: Output>? = null

    private var image: Output? = null

    private var name: Output? = null

    private var securityContext: Output? = null

    private var volumeMounts: Output>? = null

    /**
     * @param value The command to execute within the init container in exec form.
     */
    @JvmName("olyckarnwpgaclbk")
    public suspend fun command(`value`: Output>) {
        this.command = value
    }

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

    /**
     * @param values The command to execute within the init container in exec form.
     */
    @JvmName("ypedpvwtgycbocti")
    public suspend fun command(values: List>) {
        this.command = Output.all(values)
    }

    /**
     * @param value The environment variables to set in the init container.
     */
    @JvmName("ckyjlwkmjqysvewq")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

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

    /**
     * @param values The environment variables to set in the init container.
     */
    @JvmName("vpjrdsfyrpkwypgb")
    public suspend fun environmentVariables(values: List>) {
        this.environmentVariables = Output.all(values)
    }

    /**
     * @param value The image of the init container.
     */
    @JvmName("yjgonslyccrkyqgb")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value The name for the init container.
     */
    @JvmName("nduyldxabhifviar")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The container security properties.
     */
    @JvmName("mhooomwvjgdncutv")
    public suspend fun securityContext(`value`: Output) {
        this.securityContext = value
    }

    /**
     * @param value The volume mounts available to the init container.
     */
    @JvmName("evfgfvmnhrwmluus")
    public suspend fun volumeMounts(`value`: Output>) {
        this.volumeMounts = value
    }

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

    /**
     * @param values The volume mounts available to the init container.
     */
    @JvmName("vcmrkytuusxfpnqe")
    public suspend fun volumeMounts(values: List>) {
        this.volumeMounts = Output.all(values)
    }

    /**
     * @param value The command to execute within the init container in exec form.
     */
    @JvmName("xbplleoiqctmsoin")
    public suspend fun command(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.command = mapped
    }

    /**
     * @param values The command to execute within the init container in exec form.
     */
    @JvmName("lkeqtddmivsuyswc")
    public suspend fun command(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.command = mapped
    }

    /**
     * @param value The environment variables to set in the init container.
     */
    @JvmName("xjejgdlbrwbblnlj")
    public suspend fun environmentVariables(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param argument The environment variables to set in the init container.
     */
    @JvmName("dolowbbmecudapyk")
    public suspend fun environmentVariables(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EnvironmentVariableArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param argument The environment variables to set in the init container.
     */
    @JvmName("frvkbhcywtjtaiqi")
    public suspend fun environmentVariables(vararg argument: suspend EnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EnvironmentVariableArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param argument The environment variables to set in the init container.
     */
    @JvmName("caykipgpwjynpvga")
    public suspend fun environmentVariables(argument: suspend EnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EnvironmentVariableArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param values The environment variables to set in the init container.
     */
    @JvmName("umgxwwuhebolxfnd")
    public suspend fun environmentVariables(vararg values: EnvironmentVariableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value The image of the init container.
     */
    @JvmName("bssdtddhjusuqeaa")
    public suspend fun image(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value The name for the init container.
     */
    @JvmName("dnepcbknmcvdbcja")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The container security properties.
     */
    @JvmName("yifnriyjmtbvpsho")
    public suspend fun securityContext(`value`: SecurityContextDefinitionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityContext = mapped
    }

    /**
     * @param argument The container security properties.
     */
    @JvmName("avhwtcygvgdhtchf")
    public suspend fun securityContext(argument: suspend SecurityContextDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = SecurityContextDefinitionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.securityContext = mapped
    }

    /**
     * @param value The volume mounts available to the init container.
     */
    @JvmName("myggbedxovdudlcj")
    public suspend fun volumeMounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param argument The volume mounts available to the init container.
     */
    @JvmName("mwkcyiqcnythubpd")
    public suspend fun volumeMounts(argument: List Unit>) {
        val toBeMapped = argument.toList().map { VolumeMountArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument The volume mounts available to the init container.
     */
    @JvmName("pjwkyhrdowfiyqrm")
    public suspend fun volumeMounts(vararg argument: suspend VolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { VolumeMountArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument The volume mounts available to the init container.
     */
    @JvmName("gwwmvgtycrdhfvcp")
    public suspend fun volumeMounts(argument: suspend VolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VolumeMountArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param values The volume mounts available to the init container.
     */
    @JvmName("dfqewsheeivrykng")
    public suspend fun volumeMounts(vararg values: VolumeMountArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    internal fun build(): InitContainerDefinitionArgs = InitContainerDefinitionArgs(
        command = command,
        environmentVariables = environmentVariables,
        image = image,
        name = name ?: throw PulumiNullFieldException("name"),
        securityContext = securityContext,
        volumeMounts = volumeMounts,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy