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

com.pulumi.kubernetes.settings.v1alpha1.kotlin.inputs.PodPresetSpecArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.settings.v1alpha1.kotlin.inputs

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 com.pulumi.kubernetes.core.v1.kotlin.inputs.EnvFromSourceArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EnvFromSourceArgsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EnvVarArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EnvVarArgsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumeArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumeArgsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumeMountArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumeMountArgsBuilder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgsBuilder
import com.pulumi.kubernetes.settings.v1alpha1.inputs.PodPresetSpecArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * PodPresetSpec is a description of a pod preset.
 * @property env Env defines the collection of EnvVar to inject into containers.
 * @property envFrom EnvFrom defines the collection of EnvFromSource to inject into containers.
 * @property selector Selector is a label query over a set of resources, in this case pods. Required.
 * @property volumeMounts VolumeMounts defines the collection of VolumeMount to inject into containers.
 * @property volumes Volumes defines the collection of Volume to inject into the pod.
 */
public data class PodPresetSpecArgs(
    public val env: Output>? = null,
    public val envFrom: Output>? = null,
    public val selector: Output? = null,
    public val volumeMounts: Output>? = null,
    public val volumes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.settings.v1alpha1.inputs.PodPresetSpecArgs =
        com.pulumi.kubernetes.settings.v1alpha1.inputs.PodPresetSpecArgs.builder()
            .env(env?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .envFrom(
                envFrom?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .volumeMounts(
                volumeMounts?.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 [PodPresetSpecArgs].
 */
@PulumiTagMarker
public class PodPresetSpecArgsBuilder internal constructor() {
    private var env: Output>? = null

    private var envFrom: Output>? = null

    private var selector: Output? = null

    private var volumeMounts: Output>? = null

    private var volumes: Output>? = null

    /**
     * @param value Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("ukwqtlhqviyuvnbc")
    public suspend fun env(`value`: Output>) {
        this.env = value
    }

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

    /**
     * @param values Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("hjonbpamcvqesvbb")
    public suspend fun env(values: List>) {
        this.env = Output.all(values)
    }

    /**
     * @param value EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("ovhrkjxsemhnqfkj")
    public suspend fun envFrom(`value`: Output>) {
        this.envFrom = value
    }

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

    /**
     * @param values EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("rntmurefvaeaiwvj")
    public suspend fun envFrom(values: List>) {
        this.envFrom = Output.all(values)
    }

    /**
     * @param value Selector is a label query over a set of resources, in this case pods. Required.
     */
    @JvmName("tykojvxmknmubpic")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

    /**
     * @param value VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("tlqxadarhogtdlij")
    public suspend fun volumeMounts(`value`: Output>) {
        this.volumeMounts = value
    }

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

    /**
     * @param values VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("cwrdvpcxialilaro")
    public suspend fun volumeMounts(values: List>) {
        this.volumeMounts = Output.all(values)
    }

    /**
     * @param value Volumes defines the collection of Volume to inject into the pod.
     */
    @JvmName("cfxoqvnpoguempow")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values Volumes defines the collection of Volume to inject into the pod.
     */
    @JvmName("eeyxprxeboaibxne")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("pjregfagoqspxebq")
    public suspend fun env(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.env = mapped
    }

    /**
     * @param argument Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("scivglexecsirsum")
    public suspend fun env(argument: List Unit>) {
        val toBeMapped = argument.toList().map { EnvVarArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.env = mapped
    }

    /**
     * @param argument Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("uhknlgdtmdhrwyar")
    public suspend fun env(vararg argument: suspend EnvVarArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { EnvVarArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.env = mapped
    }

    /**
     * @param argument Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("nefygjvcarvniecd")
    public suspend fun env(argument: suspend EnvVarArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EnvVarArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.env = mapped
    }

    /**
     * @param values Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("bvldwcpejhoaveyt")
    public suspend fun env(vararg values: EnvVarArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.env = mapped
    }

    /**
     * @param value EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("ujrmperynkdrctiv")
    public suspend fun envFrom(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envFrom = mapped
    }

    /**
     * @param argument EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("jycoviiybrwuweqw")
    public suspend fun envFrom(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EnvFromSourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envFrom = mapped
    }

    /**
     * @param argument EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("ctedyuojolnhlaip")
    public suspend fun envFrom(vararg argument: suspend EnvFromSourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EnvFromSourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envFrom = mapped
    }

    /**
     * @param argument EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("eqghycxydjtlqupi")
    public suspend fun envFrom(argument: suspend EnvFromSourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EnvFromSourceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.envFrom = mapped
    }

    /**
     * @param values EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("oqexuyiesoeanrsk")
    public suspend fun envFrom(vararg values: EnvFromSourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envFrom = mapped
    }

    /**
     * @param value Selector is a label query over a set of resources, in this case pods. Required.
     */
    @JvmName("oqhdggumjfyfohiw")
    public suspend fun selector(`value`: LabelSelectorArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selector = mapped
    }

    /**
     * @param argument Selector is a label query over a set of resources, in this case pods. Required.
     */
    @JvmName("qcjocvwpqolmxpuc")
    public suspend fun selector(argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = LabelSelectorArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.selector = mapped
    }

    /**
     * @param value VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("dlyyvejyvchcfumt")
    public suspend fun volumeMounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param argument VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("xhnfkgrrllthhubn")
    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 VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("pxhusafvwebmeolo")
    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 VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("rtjaetcajbilvwfx")
    public suspend fun volumeMounts(argument: suspend VolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VolumeMountArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param values VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("kkpfpjtmhqdysihp")
    public suspend fun volumeMounts(vararg values: VolumeMountArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param value Volumes defines the collection of Volume to inject into the pod.
     */
    @JvmName("kpfuwqxetnbfckko")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument Volumes defines the collection of Volume to inject into the pod.
     */
    @JvmName("auepjgxdkcpmrhwx")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map { VolumeArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Volumes defines the collection of Volume to inject into the pod.
     */
    @JvmName("qwimjdbbjnuhicvj")
    public suspend fun volumes(vararg argument: suspend VolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { VolumeArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Volumes defines the collection of Volume to inject into the pod.
     */
    @JvmName("mdswxwhqauechxib")
    public suspend fun volumes(argument: suspend VolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VolumeArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values Volumes defines the collection of Volume to inject into the pod.
     */
    @JvmName("ntiodflqmjlsfxst")
    public suspend fun volumes(vararg values: VolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    internal fun build(): PodPresetSpecArgs = PodPresetSpecArgs(
        env = env,
        envFrom = envFrom,
        selector = selector,
        volumeMounts = volumeMounts,
        volumes = volumes,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy