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

com.pulumi.gcp.cloudrun.kotlin.inputs.ServiceTemplateSpecContainerArgs.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudrun.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecContainerArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property args Arguments to the entrypoint.
 * The docker image's CMD is used if this is not provided.
 * @property commands Entrypoint array. Not executed within a shell.
 * The docker image's ENTRYPOINT is used if this is not provided.
 * @property envFroms (Optional, Deprecated)
 * List of sources to populate environment variables in the container.
 * All invalid keys will be reported as an event when the container is starting.
 * When a key exists in multiple sources, the value associated with the last source will
 * take precedence. Values defined by an Env with a duplicate key will take
 * precedence.
 * Structure is documented below.
 * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
 * @property envs List of environment variables to set in the container.
 * Structure is documented below.
 * @property image Docker image name. This is most often a reference to a container located
 * in the container registry, such as gcr.io/cloudrun/hello
 * @property livenessProbe Periodic probe of container liveness. Container will be restarted if the probe fails. More info:
 * https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
 * Structure is documented below.
 * @property name Name of the container
 * @property ports List of open ports in the container.
 * Structure is documented below.
 * @property resources Compute Resources required by this container. Used to set values such as max memory
 * Structure is documented below.
 * @property startupProbe Startup probe of application within the container.
 * All other probes are disabled if a startup probe is provided, until it
 * succeeds. Container will not be added to service endpoints if the probe fails.
 * Structure is documented below.
 * @property volumeMounts Volume to mount into the container's filesystem.
 * Only supports SecretVolumeSources.
 * Structure is documented below.
 * @property workingDir (Optional, Deprecated)
 * Container's working directory.
 * If not specified, the container runtime's default will be used, which
 * might be configured in the container image.
 * > **Warning:** `working_dir` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
 */
public data class ServiceTemplateSpecContainerArgs(
    public val args: Output>? = null,
    public val commands: Output>? = null,
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    public val envFroms: Output>? = null,
    public val envs: Output>? = null,
    public val image: Output,
    public val livenessProbe: Output? = null,
    public val name: Output? = null,
    public val ports: Output>? = null,
    public val resources: Output? = null,
    public val startupProbe: Output? = null,
    public val volumeMounts: Output>? = null,
    @Deprecated(
        message = """
  `working_dir` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    public val workingDir: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecContainerArgs =
        com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecContainerArgs.builder()
            .args(args?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .commands(commands?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .envFroms(
                envFroms?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .envs(envs?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .image(image.applyValue({ args0 -> args0 }))
            .livenessProbe(livenessProbe?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .ports(ports?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .resources(resources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .startupProbe(startupProbe?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .volumeMounts(
                volumeMounts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .workingDir(workingDir?.applyValue({ args0 -> args0 })).build()
}

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

    private var commands: Output>? = null

    private var envFroms: Output>? = null

    private var envs: Output>? = null

    private var image: Output? = null

    private var livenessProbe: Output? = null

    private var name: Output? = null

    private var ports: Output>? = null

    private var resources: Output? = null

    private var startupProbe: Output? = null

    private var volumeMounts: Output>? = null

    private var workingDir: Output? = null

    /**
     * @param value Arguments to the entrypoint.
     * The docker image's CMD is used if this is not provided.
     */
    @JvmName("glcffldbaxafjoev")
    public suspend fun args(`value`: Output>) {
        this.args = value
    }

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

    /**
     * @param values Arguments to the entrypoint.
     * The docker image's CMD is used if this is not provided.
     */
    @JvmName("xomwfndfhmquswqq")
    public suspend fun args(values: List>) {
        this.args = Output.all(values)
    }

    /**
     * @param value Entrypoint array. Not executed within a shell.
     * The docker image's ENTRYPOINT is used if this is not provided.
     */
    @JvmName("ogiaroccsvgdsylv")
    public suspend fun commands(`value`: Output>) {
        this.commands = value
    }

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

    /**
     * @param values Entrypoint array. Not executed within a shell.
     * The docker image's ENTRYPOINT is used if this is not provided.
     */
    @JvmName("jqiupmhivvxmrauk")
    public suspend fun commands(values: List>) {
        this.commands = Output.all(values)
    }

    /**
     * @param value (Optional, Deprecated)
     * List of sources to populate environment variables in the container.
     * All invalid keys will be reported as an event when the container is starting.
     * When a key exists in multiple sources, the value associated with the last source will
     * take precedence. Values defined by an Env with a duplicate key will take
     * precedence.
     * Structure is documented below.
     * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("ychlsbmunjkcpdvw")
    public suspend fun envFroms(`value`: Output>) {
        this.envFroms = value
    }

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

    /**
     * @param values (Optional, Deprecated)
     * List of sources to populate environment variables in the container.
     * All invalid keys will be reported as an event when the container is starting.
     * When a key exists in multiple sources, the value associated with the last source will
     * take precedence. Values defined by an Env with a duplicate key will take
     * precedence.
     * Structure is documented below.
     * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("kmieirddngvdfchm")
    public suspend fun envFroms(values: List>) {
        this.envFroms = Output.all(values)
    }

    /**
     * @param value List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("cvdpjyabrgaooolt")
    public suspend fun envs(`value`: Output>) {
        this.envs = value
    }

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

    /**
     * @param values List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("epnbpyqoecojohxc")
    public suspend fun envs(values: List>) {
        this.envs = Output.all(values)
    }

    /**
     * @param value Docker image name. This is most often a reference to a container located
     * in the container registry, such as gcr.io/cloudrun/hello
     */
    @JvmName("xwbkmrohbemtrqdm")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Periodic probe of container liveness. Container will be restarted if the probe fails. More info:
     * https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
     * Structure is documented below.
     */
    @JvmName("wytmwhkqowlwynuk")
    public suspend fun livenessProbe(`value`: Output) {
        this.livenessProbe = value
    }

    /**
     * @param value Name of the container
     */
    @JvmName("nsybuudciklslotv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value List of open ports in the container.
     * Structure is documented below.
     */
    @JvmName("kcxdkumyoivvjoka")
    public suspend fun ports(`value`: Output>) {
        this.ports = value
    }

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

    /**
     * @param values List of open ports in the container.
     * Structure is documented below.
     */
    @JvmName("kthmrmimhiuhfnlf")
    public suspend fun ports(values: List>) {
        this.ports = Output.all(values)
    }

    /**
     * @param value Compute Resources required by this container. Used to set values such as max memory
     * Structure is documented below.
     */
    @JvmName("glfguttorfavmoqf")
    public suspend fun resources(`value`: Output) {
        this.resources = value
    }

    /**
     * @param value Startup probe of application within the container.
     * All other probes are disabled if a startup probe is provided, until it
     * succeeds. Container will not be added to service endpoints if the probe fails.
     * Structure is documented below.
     */
    @JvmName("kogatgpoltaauxky")
    public suspend fun startupProbe(`value`: Output) {
        this.startupProbe = value
    }

    /**
     * @param value Volume to mount into the container's filesystem.
     * Only supports SecretVolumeSources.
     * Structure is documented below.
     */
    @JvmName("cwyadroiwdxoduqf")
    public suspend fun volumeMounts(`value`: Output>) {
        this.volumeMounts = value
    }

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

    /**
     * @param values Volume to mount into the container's filesystem.
     * Only supports SecretVolumeSources.
     * Structure is documented below.
     */
    @JvmName("grdryutsvmtptoqf")
    public suspend fun volumeMounts(values: List>) {
        this.volumeMounts = Output.all(values)
    }

    /**
     * @param value (Optional, Deprecated)
     * Container's working directory.
     * If not specified, the container runtime's default will be used, which
     * might be configured in the container image.
     * > **Warning:** `working_dir` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `working_dir` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("qnkmhqvrjgcioylg")
    public suspend fun workingDir(`value`: Output) {
        this.workingDir = value
    }

    /**
     * @param value Arguments to the entrypoint.
     * The docker image's CMD is used if this is not provided.
     */
    @JvmName("bcddnvklutoqwtfa")
    public suspend fun args(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param values Arguments to the entrypoint.
     * The docker image's CMD is used if this is not provided.
     */
    @JvmName("xyvpgjgliswqkecu")
    public suspend fun args(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param value Entrypoint array. Not executed within a shell.
     * The docker image's ENTRYPOINT is used if this is not provided.
     */
    @JvmName("wvmnwtgvpsjhjwix")
    public suspend fun commands(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param values Entrypoint array. Not executed within a shell.
     * The docker image's ENTRYPOINT is used if this is not provided.
     */
    @JvmName("lgfckrpxicliwyqe")
    public suspend fun commands(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param value (Optional, Deprecated)
     * List of sources to populate environment variables in the container.
     * All invalid keys will be reported as an event when the container is starting.
     * When a key exists in multiple sources, the value associated with the last source will
     * take precedence. Values defined by an Env with a duplicate key will take
     * precedence.
     * Structure is documented below.
     * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("xvfqkpjcvrmvtnjw")
    public suspend fun envFroms(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envFroms = mapped
    }

    /**
     * @param argument (Optional, Deprecated)
     * List of sources to populate environment variables in the container.
     * All invalid keys will be reported as an event when the container is starting.
     * When a key exists in multiple sources, the value associated with the last source will
     * take precedence. Values defined by an Env with a duplicate key will take
     * precedence.
     * Structure is documented below.
     * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("ecphgcsyufsbxmsb")
    public suspend fun envFroms(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerEnvFromArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envFroms = mapped
    }

    /**
     * @param argument (Optional, Deprecated)
     * List of sources to populate environment variables in the container.
     * All invalid keys will be reported as an event when the container is starting.
     * When a key exists in multiple sources, the value associated with the last source will
     * take precedence. Values defined by an Env with a duplicate key will take
     * precedence.
     * Structure is documented below.
     * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("obqqwcggiihryoot")
    public suspend fun envFroms(vararg argument: suspend ServiceTemplateSpecContainerEnvFromArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerEnvFromArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envFroms = mapped
    }

    /**
     * @param argument (Optional, Deprecated)
     * List of sources to populate environment variables in the container.
     * All invalid keys will be reported as an event when the container is starting.
     * When a key exists in multiple sources, the value associated with the last source will
     * take precedence. Values defined by an Env with a duplicate key will take
     * precedence.
     * Structure is documented below.
     * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("eupwroiuhkmxpqlv")
    public suspend fun envFroms(argument: suspend ServiceTemplateSpecContainerEnvFromArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceTemplateSpecContainerEnvFromArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.envFroms = mapped
    }

    /**
     * @param values (Optional, Deprecated)
     * List of sources to populate environment variables in the container.
     * All invalid keys will be reported as an event when the container is starting.
     * When a key exists in multiple sources, the value associated with the last source will
     * take precedence. Values defined by an Env with a duplicate key will take
     * precedence.
     * Structure is documented below.
     * > **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `env_from` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("jkwixgdopxvsqvyj")
    public suspend fun envFroms(vararg values: ServiceTemplateSpecContainerEnvFromArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envFroms = mapped
    }

    /**
     * @param value List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("bgjgedlstlbxaiml")
    public suspend fun envs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param argument List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("wcgfakwbndqeceif")
    public suspend fun envs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerEnvArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("qdpihtjeidkitkyl")
    public suspend fun envs(vararg argument: suspend ServiceTemplateSpecContainerEnvArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerEnvArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("hvixmeltyxjyakmu")
    public suspend fun envs(argument: suspend ServiceTemplateSpecContainerEnvArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceTemplateSpecContainerEnvArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param values List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("nvixgirjbdajklbx")
    public suspend fun envs(vararg values: ServiceTemplateSpecContainerEnvArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param value Docker image name. This is most often a reference to a container located
     * in the container registry, such as gcr.io/cloudrun/hello
     */
    @JvmName("arceyppgwhmoqnrk")
    public suspend fun image(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value Periodic probe of container liveness. Container will be restarted if the probe fails. More info:
     * https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
     * Structure is documented below.
     */
    @JvmName("nehmrbgwbnstulks")
    public suspend fun livenessProbe(`value`: ServiceTemplateSpecContainerLivenessProbeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.livenessProbe = mapped
    }

    /**
     * @param argument Periodic probe of container liveness. Container will be restarted if the probe fails. More info:
     * https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
     * Structure is documented below.
     */
    @JvmName("mcvfwfdsipvtusfv")
    public suspend fun livenessProbe(argument: suspend ServiceTemplateSpecContainerLivenessProbeArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateSpecContainerLivenessProbeArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.livenessProbe = mapped
    }

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

    /**
     * @param value List of open ports in the container.
     * Structure is documented below.
     */
    @JvmName("dbmerahnwgastlnr")
    public suspend fun ports(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param argument List of open ports in the container.
     * Structure is documented below.
     */
    @JvmName("iubnnolgvyyverxo")
    public suspend fun ports(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument List of open ports in the container.
     * Structure is documented below.
     */
    @JvmName("rsdvwajyvkivbycb")
    public suspend fun ports(vararg argument: suspend ServiceTemplateSpecContainerPortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument List of open ports in the container.
     * Structure is documented below.
     */
    @JvmName("yvlrvdqfhaimrefd")
    public suspend fun ports(argument: suspend ServiceTemplateSpecContainerPortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceTemplateSpecContainerPortArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param values List of open ports in the container.
     * Structure is documented below.
     */
    @JvmName("chgntaergnnfbvdk")
    public suspend fun ports(vararg values: ServiceTemplateSpecContainerPortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param value Compute Resources required by this container. Used to set values such as max memory
     * Structure is documented below.
     */
    @JvmName("phkhoxpjnkdbsklb")
    public suspend fun resources(`value`: ServiceTemplateSpecContainerResourcesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param argument Compute Resources required by this container. Used to set values such as max memory
     * Structure is documented below.
     */
    @JvmName("qeptepfxosrawwwy")
    public suspend fun resources(argument: suspend ServiceTemplateSpecContainerResourcesArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateSpecContainerResourcesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    /**
     * @param value Startup probe of application within the container.
     * All other probes are disabled if a startup probe is provided, until it
     * succeeds. Container will not be added to service endpoints if the probe fails.
     * Structure is documented below.
     */
    @JvmName("drmwwruincitfpcf")
    public suspend fun startupProbe(`value`: ServiceTemplateSpecContainerStartupProbeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startupProbe = mapped
    }

    /**
     * @param argument Startup probe of application within the container.
     * All other probes are disabled if a startup probe is provided, until it
     * succeeds. Container will not be added to service endpoints if the probe fails.
     * Structure is documented below.
     */
    @JvmName("kvuitvtmckftwjcv")
    public suspend fun startupProbe(argument: suspend ServiceTemplateSpecContainerStartupProbeArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateSpecContainerStartupProbeArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.startupProbe = mapped
    }

    /**
     * @param value Volume to mount into the container's filesystem.
     * Only supports SecretVolumeSources.
     * Structure is documented below.
     */
    @JvmName("aqumjppacnpbbkjf")
    public suspend fun volumeMounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume to mount into the container's filesystem.
     * Only supports SecretVolumeSources.
     * Structure is documented below.
     */
    @JvmName("uhhweknivadtvrba")
    public suspend fun volumeMounts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume to mount into the container's filesystem.
     * Only supports SecretVolumeSources.
     * Structure is documented below.
     */
    @JvmName("twohtipfkguriwgy")
    public suspend fun volumeMounts(vararg argument: suspend ServiceTemplateSpecContainerVolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume to mount into the container's filesystem.
     * Only supports SecretVolumeSources.
     * Structure is documented below.
     */
    @JvmName("qweqhyyufulagcgj")
    public suspend fun volumeMounts(argument: suspend ServiceTemplateSpecContainerVolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceTemplateSpecContainerVolumeMountArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param values Volume to mount into the container's filesystem.
     * Only supports SecretVolumeSources.
     * Structure is documented below.
     */
    @JvmName("yuxshaimpfleeidd")
    public suspend fun volumeMounts(vararg values: ServiceTemplateSpecContainerVolumeMountArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param value (Optional, Deprecated)
     * Container's working directory.
     * If not specified, the container runtime's default will be used, which
     * might be configured in the container image.
     * > **Warning:** `working_dir` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `working_dir` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("vhueawptaqvdbrwh")
    public suspend fun workingDir(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workingDir = mapped
    }

    internal fun build(): ServiceTemplateSpecContainerArgs = ServiceTemplateSpecContainerArgs(
        args = args,
        commands = commands,
        envFroms = envFroms,
        envs = envs,
        image = image ?: throw PulumiNullFieldException("image"),
        livenessProbe = livenessProbe,
        name = name,
        ports = ports,
        resources = resources,
        startupProbe = startupProbe,
        volumeMounts = volumeMounts,
        workingDir = workingDir,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy