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

com.pulumi.kubernetes.settings.v1alpha1.kotlin.inputs.PodPresetSpecPatchArgs.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.EnvFromSourcePatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EnvFromSourcePatchArgsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EnvVarPatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.EnvVarPatchArgsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumeMountPatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumeMountPatchArgsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumePatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.VolumePatchArgsBuilder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgsBuilder
import com.pulumi.kubernetes.settings.v1alpha1.inputs.PodPresetSpecPatchArgs.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 PodPresetSpecPatchArgs(
    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.PodPresetSpecPatchArgs =
        com.pulumi.kubernetes.settings.v1alpha1.inputs.PodPresetSpecPatchArgs.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 [PodPresetSpecPatchArgs].
 */
@PulumiTagMarker
public class PodPresetSpecPatchArgsBuilder 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("ijfhlkqerfuiiedy")
    public suspend fun env(`value`: Output>) {
        this.env = value
    }

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

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

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

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

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

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

    /**
     * @param value Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("jvynvtpdqlbokosk")
    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("hyneawxauspleduu")
    public suspend fun env(argument: List Unit>) {
        val toBeMapped = argument.toList().map { EnvVarPatchArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.env = mapped
    }

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

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

    /**
     * @param values Env defines the collection of EnvVar to inject into containers.
     */
    @JvmName("jtwmsehqbglyqjys")
    public suspend fun env(vararg values: EnvVarPatchArgs) {
        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("omeqwwqkuxhotlds")
    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("khnnjqybltsggkcd")
    public suspend fun envFrom(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EnvFromSourcePatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.envFrom = mapped
    }

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

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

    /**
     * @param values EnvFrom defines the collection of EnvFromSource to inject into containers.
     */
    @JvmName("ocxmtuirvvysxlcv")
    public suspend fun envFrom(vararg values: EnvFromSourcePatchArgs) {
        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("mkgsppyfiiscyreb")
    public suspend fun selector(`value`: LabelSelectorPatchArgs?) {
        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("qfxdmyblpxecxkhn")
    public suspend fun selector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = LabelSelectorPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.selector = mapped
    }

    /**
     * @param value VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("fkvyjlwnmnfyujgr")
    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("ducortkmtypnvnkb")
    public suspend fun volumeMounts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VolumeMountPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("vfclsyofinemasmj")
    public suspend fun volumeMounts(vararg argument: suspend VolumeMountPatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VolumeMountPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("vyhtmadqbwynkesk")
    public suspend fun volumeMounts(argument: suspend VolumeMountPatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VolumeMountPatchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param values VolumeMounts defines the collection of VolumeMount to inject into containers.
     */
    @JvmName("flkxxsvnemrwjrbu")
    public suspend fun volumeMounts(vararg values: VolumeMountPatchArgs) {
        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("alaooccrvensltlo")
    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("jvidcsdkxukltewa")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map { VolumePatchArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy