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.

There is a newer version: 4.18.2.0
Show 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("oppvsawmdhqcucsc")
    public suspend fun env(`value`: Output>) {
        this.env = value
    }

    @JvmName("kuiofssologwphyt")
    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("xlocmoqeegnrdbeo")
    public suspend fun env(values: List>) {
        this.env = Output.all(values)
    }

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

    @JvmName("pqoqvrpxiqyvqnpd")
    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("sgvxkxhokecnfhke")
    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("aneincrroqdkhcnw")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

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

    @JvmName("xgwqsogrxeguxynp")
    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("rjovrlllkpktdsnm")
    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("fpbriblnxurchbsx")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

    @JvmName("kqhifqhqgyccxxuo")
    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("gdtpddtmomjsttcb")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("kpbcngjpumimlgsd")
    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("diriffbcoxuwdbhm")
    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("ulteloxxvssshaqe")
    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("wiiqhlepibjumltf")
    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("hpjgxjcnpnqwhwmt")
    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("sehfpdtwgcofhjcm")
    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("mtwrtcyxttyndmxu")
    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("vfqtsvtartfvswhs")
    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("ujywwmmjwdslhciw")
    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("cthmubqlphhgymql")
    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("uwvkjrmdwrvtbvgn")
    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("dnabvvrjmibxujqt")
    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("gqexaokuosomikpq")
    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("qhqqugymlhlsghms")
    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("oqpyxqqjtvmgknnx")
    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("oeqpbuklvxjrugrn")
    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("phynfyqudnbfubdp")
    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("kfbfvarsjqghqwoc")
    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("imriclsmtdwhsrdd")
    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("qapuaujcxngkhofc")
    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("uhquvudmemcqdppt")
    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("fmwntjynrlpcpboe")
    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