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

com.pulumi.gcp.cloudrun.kotlin.inputs.ServiceTemplateSpecArgs.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.10.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.ServiceTemplateSpecArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property containerConcurrency ContainerConcurrency specifies the maximum allowed in-flight (concurrent)
 * requests per container of the Revision. Values are:
 * @property containers Containers defines the unit of execution for this Revision.
 * Structure is documented below.
 * @property serviceAccountName Email address of the IAM service account associated with the revision of the
 * service. The service account represents the identity of the running revision,
 * and determines what permissions the revision has. If not provided, the revision
 * will use the project's default service account.
 * @property servingState (Output, Deprecated)
 * ServingState holds a value describing the state the resources
 * are in for this Revision.
 * It is expected
 * that the system will manipulate this based on routability and load.
 * > **Warning:** `serving_state` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
 * @property timeoutSeconds TimeoutSeconds holds the max duration the instance is allowed for responding to a request.
 * @property volumes Volume represents a named volume in a container.
 * Structure is documented below.
 */
public data class ServiceTemplateSpecArgs(
    public val containerConcurrency: Output? = null,
    public val containers: Output>? = null,
    public val serviceAccountName: Output? = null,
    @Deprecated(
        message = """
  `serving_state` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    public val servingState: Output? = null,
    public val timeoutSeconds: Output? = null,
    public val volumes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecArgs =
        com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecArgs.builder()
            .containerConcurrency(containerConcurrency?.applyValue({ args0 -> args0 }))
            .containers(
                containers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .serviceAccountName(serviceAccountName?.applyValue({ args0 -> args0 }))
            .servingState(servingState?.applyValue({ args0 -> args0 }))
            .timeoutSeconds(timeoutSeconds?.applyValue({ args0 -> args0 }))
            .volumes(
                volumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ServiceTemplateSpecArgs].
 */
@PulumiTagMarker
public class ServiceTemplateSpecArgsBuilder internal constructor() {
    private var containerConcurrency: Output? = null

    private var containers: Output>? = null

    private var serviceAccountName: Output? = null

    private var servingState: Output? = null

    private var timeoutSeconds: Output? = null

    private var volumes: Output>? = null

    /**
     * @param value ContainerConcurrency specifies the maximum allowed in-flight (concurrent)
     * requests per container of the Revision. Values are:
     */
    @JvmName("qsrbpgbtoudturji")
    public suspend fun containerConcurrency(`value`: Output) {
        this.containerConcurrency = value
    }

    /**
     * @param value Containers defines the unit of execution for this Revision.
     * Structure is documented below.
     */
    @JvmName("hjdfvtnfvnxuwmaj")
    public suspend fun containers(`value`: Output>) {
        this.containers = value
    }

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

    /**
     * @param values Containers defines the unit of execution for this Revision.
     * Structure is documented below.
     */
    @JvmName("vnkxpvahkunksbll")
    public suspend fun containers(values: List>) {
        this.containers = Output.all(values)
    }

    /**
     * @param value Email address of the IAM service account associated with the revision of the
     * service. The service account represents the identity of the running revision,
     * and determines what permissions the revision has. If not provided, the revision
     * will use the project's default service account.
     */
    @JvmName("rtrktqoqjmhsckex")
    public suspend fun serviceAccountName(`value`: Output) {
        this.serviceAccountName = value
    }

    /**
     * @param value (Output, Deprecated)
     * ServingState holds a value describing the state the resources
     * are in for this Revision.
     * It is expected
     * that the system will manipulate this based on routability and load.
     * > **Warning:** `serving_state` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `serving_state` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("havvjilwybtaufwl")
    public suspend fun servingState(`value`: Output) {
        this.servingState = value
    }

    /**
     * @param value TimeoutSeconds holds the max duration the instance is allowed for responding to a request.
     */
    @JvmName("rnbhtvivjcxtftja")
    public suspend fun timeoutSeconds(`value`: Output) {
        this.timeoutSeconds = value
    }

    /**
     * @param value Volume represents a named volume in a container.
     * Structure is documented below.
     */
    @JvmName("aoiqgyojbherebnm")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values Volume represents a named volume in a container.
     * Structure is documented below.
     */
    @JvmName("uecknsdyoihyauch")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value ContainerConcurrency specifies the maximum allowed in-flight (concurrent)
     * requests per container of the Revision. Values are:
     */
    @JvmName("hfpuddvpdqoswyou")
    public suspend fun containerConcurrency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerConcurrency = mapped
    }

    /**
     * @param value Containers defines the unit of execution for this Revision.
     * Structure is documented below.
     */
    @JvmName("hntyuidvysmflanw")
    public suspend fun containers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param argument Containers defines the unit of execution for this Revision.
     * Structure is documented below.
     */
    @JvmName("agmikuydifpvmcag")
    public suspend fun containers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument Containers defines the unit of execution for this Revision.
     * Structure is documented below.
     */
    @JvmName("ssanenoagjxqxqil")
    public suspend fun containers(vararg argument: suspend ServiceTemplateSpecContainerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument Containers defines the unit of execution for this Revision.
     * Structure is documented below.
     */
    @JvmName("wcnjcxeqxauyuacf")
    public suspend fun containers(argument: suspend ServiceTemplateSpecContainerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceTemplateSpecContainerArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param values Containers defines the unit of execution for this Revision.
     * Structure is documented below.
     */
    @JvmName("oehsydnrryoapttd")
    public suspend fun containers(vararg values: ServiceTemplateSpecContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param value Email address of the IAM service account associated with the revision of the
     * service. The service account represents the identity of the running revision,
     * and determines what permissions the revision has. If not provided, the revision
     * will use the project's default service account.
     */
    @JvmName("isvpmytylolgcplk")
    public suspend fun serviceAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountName = mapped
    }

    /**
     * @param value (Output, Deprecated)
     * ServingState holds a value describing the state the resources
     * are in for this Revision.
     * It is expected
     * that the system will manipulate this based on routability and load.
     * > **Warning:** `serving_state` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API.
     */
    @Deprecated(
        message = """
  `serving_state` is deprecated and will be removed in a future major release. This field is not
      supported by the Cloud Run API.
  """,
    )
    @JvmName("psylxfstcwhgxxci")
    public suspend fun servingState(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.servingState = mapped
    }

    /**
     * @param value TimeoutSeconds holds the max duration the instance is allowed for responding to a request.
     */
    @JvmName("eoksvmhbyvjqfvga")
    public suspend fun timeoutSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeoutSeconds = mapped
    }

    /**
     * @param value Volume represents a named volume in a container.
     * Structure is documented below.
     */
    @JvmName("kdacffqvvcarmmhb")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument Volume represents a named volume in a container.
     * Structure is documented below.
     */
    @JvmName("iyvgojaxifcfepko")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Volume represents a named volume in a container.
     * Structure is documented below.
     */
    @JvmName("twqaejtxkwubsyjt")
    public suspend fun volumes(vararg argument: suspend ServiceTemplateSpecVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceTemplateSpecVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Volume represents a named volume in a container.
     * Structure is documented below.
     */
    @JvmName("vmyrtecppoovccky")
    public suspend fun volumes(argument: suspend ServiceTemplateSpecVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceTemplateSpecVolumeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values Volume represents a named volume in a container.
     * Structure is documented below.
     */
    @JvmName("qqmkeddlsevycdmu")
    public suspend fun volumes(vararg values: ServiceTemplateSpecVolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    internal fun build(): ServiceTemplateSpecArgs = ServiceTemplateSpecArgs(
        containerConcurrency = containerConcurrency,
        containers = containers,
        serviceAccountName = serviceAccountName,
        servingState = servingState,
        timeoutSeconds = timeoutSeconds,
        volumes = volumes,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy