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

com.pulumi.cloudflare.kotlin.inputs.PagesProjectDeploymentConfigsProductionArgs.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.cloudflare.kotlin.inputs

import com.pulumi.cloudflare.inputs.PagesProjectDeploymentConfigsProductionArgs.builder
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 kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property alwaysUseLatestCompatibilityDate Use latest compatibility date for Pages Functions. Defaults to `false`.
 * @property compatibilityDate Compatibility date used for Pages Functions.
 * @property compatibilityFlags Compatibility flags used for Pages Functions.
 * @property d1Databases D1 Databases used for Pages Functions. Defaults to `map[]`.
 * @property durableObjectNamespaces Durable Object namespaces used for Pages Functions. Defaults to `map[]`.
 * @property environmentVariables Environment variables for Pages Functions. Defaults to `map[]`.
 * @property failOpen Fail open used for Pages Functions. Defaults to `false`.
 * @property kvNamespaces KV namespaces used for Pages Functions. Defaults to `map[]`.
 * @property placement Configuration for placement in the Cloudflare Pages project.
 * @property r2Buckets R2 Buckets used for Pages Functions. Defaults to `map[]`.
 * @property secrets Encrypted environment variables for Pages Functions. Defaults to `map[]`.
 * @property serviceBindings Services used for Pages Functions.
 * @property usageModel Usage model used for Pages Functions. Available values: `unbound`, `bundled`, `standard`. Defaults to `bundled`.
 */
public data class PagesProjectDeploymentConfigsProductionArgs(
    public val alwaysUseLatestCompatibilityDate: Output? = null,
    public val compatibilityDate: Output? = null,
    public val compatibilityFlags: Output>? = null,
    public val d1Databases: Output>? = null,
    public val durableObjectNamespaces: Output>? = null,
    public val environmentVariables: Output>? = null,
    public val failOpen: Output? = null,
    public val kvNamespaces: Output>? = null,
    public val placement: Output? = null,
    public val r2Buckets: Output>? = null,
    public val secrets: Output>? = null,
    public val serviceBindings: Output>? = null,
    public val usageModel: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.PagesProjectDeploymentConfigsProductionArgs =
        com.pulumi.cloudflare.inputs.PagesProjectDeploymentConfigsProductionArgs.builder()
            .alwaysUseLatestCompatibilityDate(alwaysUseLatestCompatibilityDate?.applyValue({ args0 -> args0 }))
            .compatibilityDate(compatibilityDate?.applyValue({ args0 -> args0 }))
            .compatibilityFlags(compatibilityFlags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .d1Databases(
                d1Databases?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .durableObjectNamespaces(
                durableObjectNamespaces?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .failOpen(failOpen?.applyValue({ args0 -> args0 }))
            .kvNamespaces(
                kvNamespaces?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .placement(placement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .r2Buckets(
                r2Buckets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .secrets(secrets?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .serviceBindings(
                serviceBindings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .usageModel(usageModel?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PagesProjectDeploymentConfigsProductionArgs].
 */
@PulumiTagMarker
public class PagesProjectDeploymentConfigsProductionArgsBuilder internal constructor() {
    private var alwaysUseLatestCompatibilityDate: Output? = null

    private var compatibilityDate: Output? = null

    private var compatibilityFlags: Output>? = null

    private var d1Databases: Output>? = null

    private var durableObjectNamespaces: Output>? = null

    private var environmentVariables: Output>? = null

    private var failOpen: Output? = null

    private var kvNamespaces: Output>? = null

    private var placement: Output? = null

    private var r2Buckets: Output>? = null

    private var secrets: Output>? = null

    private var serviceBindings:
        Output>? = null

    private var usageModel: Output? = null

    /**
     * @param value Use latest compatibility date for Pages Functions. Defaults to `false`.
     */
    @JvmName("hykesapbqsmymgdt")
    public suspend fun alwaysUseLatestCompatibilityDate(`value`: Output) {
        this.alwaysUseLatestCompatibilityDate = value
    }

    /**
     * @param value Compatibility date used for Pages Functions.
     */
    @JvmName("byohhhigttmvwgxn")
    public suspend fun compatibilityDate(`value`: Output) {
        this.compatibilityDate = value
    }

    /**
     * @param value Compatibility flags used for Pages Functions.
     */
    @JvmName("qorwfgpmldqormiu")
    public suspend fun compatibilityFlags(`value`: Output>) {
        this.compatibilityFlags = value
    }

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

    /**
     * @param values Compatibility flags used for Pages Functions.
     */
    @JvmName("ldmtkitfknherovm")
    public suspend fun compatibilityFlags(values: List>) {
        this.compatibilityFlags = Output.all(values)
    }

    /**
     * @param value D1 Databases used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("cdemrwwlssjuswhv")
    public suspend fun d1Databases(`value`: Output>) {
        this.d1Databases = value
    }

    /**
     * @param value Durable Object namespaces used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("ndsrbvmqigkqqcpc")
    public suspend fun durableObjectNamespaces(`value`: Output>) {
        this.durableObjectNamespaces = value
    }

    /**
     * @param value Environment variables for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("biskpmuwjhtberyw")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value Fail open used for Pages Functions. Defaults to `false`.
     */
    @JvmName("uggasrpvmtqvonkd")
    public suspend fun failOpen(`value`: Output) {
        this.failOpen = value
    }

    /**
     * @param value KV namespaces used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("rgoubexwwmsblqdv")
    public suspend fun kvNamespaces(`value`: Output>) {
        this.kvNamespaces = value
    }

    /**
     * @param value Configuration for placement in the Cloudflare Pages project.
     */
    @JvmName("urhmirqevsflxlip")
    public suspend fun placement(`value`: Output) {
        this.placement = value
    }

    /**
     * @param value R2 Buckets used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("twfrdqfcxijhrifd")
    public suspend fun r2Buckets(`value`: Output>) {
        this.r2Buckets = value
    }

    /**
     * @param value Encrypted environment variables for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("fmjcaymvjftkngfk")
    public suspend fun secrets(`value`: Output>) {
        this.secrets = value
    }

    /**
     * @param value Services used for Pages Functions.
     */
    @JvmName("fqjsppukgxnknjrw")
    public suspend fun serviceBindings(`value`: Output>) {
        this.serviceBindings = value
    }

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

    /**
     * @param values Services used for Pages Functions.
     */
    @JvmName("fjdrvyjjnrelflcp")
    public suspend fun serviceBindings(values: List>) {
        this.serviceBindings = Output.all(values)
    }

    /**
     * @param value Usage model used for Pages Functions. Available values: `unbound`, `bundled`, `standard`. Defaults to `bundled`.
     */
    @JvmName("ijwmpdxpljxakbrg")
    public suspend fun usageModel(`value`: Output) {
        this.usageModel = value
    }

    /**
     * @param value Use latest compatibility date for Pages Functions. Defaults to `false`.
     */
    @JvmName("motirgjakivwyopy")
    public suspend fun alwaysUseLatestCompatibilityDate(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alwaysUseLatestCompatibilityDate = mapped
    }

    /**
     * @param value Compatibility date used for Pages Functions.
     */
    @JvmName("tkvrirmovrwmgcra")
    public suspend fun compatibilityDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.compatibilityDate = mapped
    }

    /**
     * @param value Compatibility flags used for Pages Functions.
     */
    @JvmName("imqfabqebbajcnxl")
    public suspend fun compatibilityFlags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.compatibilityFlags = mapped
    }

    /**
     * @param values Compatibility flags used for Pages Functions.
     */
    @JvmName("kgaigftjhjftyjqs")
    public suspend fun compatibilityFlags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.compatibilityFlags = mapped
    }

    /**
     * @param value D1 Databases used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("jyixsthskoncppom")
    public suspend fun d1Databases(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.d1Databases = mapped
    }

    /**
     * @param values D1 Databases used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("wbaemxxkcpjmpyey")
    public fun d1Databases(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.d1Databases = mapped
    }

    /**
     * @param value Durable Object namespaces used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("njmegatevitrucfx")
    public suspend fun durableObjectNamespaces(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.durableObjectNamespaces = mapped
    }

    /**
     * @param values Durable Object namespaces used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("ygvtjuflspouuesh")
    public fun durableObjectNamespaces(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.durableObjectNamespaces = mapped
    }

    /**
     * @param value Environment variables for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("gqcgwjovawdmxxkw")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param values Environment variables for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("ymoyiiulfeuajhcc")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value Fail open used for Pages Functions. Defaults to `false`.
     */
    @JvmName("cgnhpxquwoafncro")
    public suspend fun failOpen(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.failOpen = mapped
    }

    /**
     * @param value KV namespaces used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("iddjymqnjoblhvui")
    public suspend fun kvNamespaces(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kvNamespaces = mapped
    }

    /**
     * @param values KV namespaces used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("hwelxruggkfmosst")
    public fun kvNamespaces(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kvNamespaces = mapped
    }

    /**
     * @param value Configuration for placement in the Cloudflare Pages project.
     */
    @JvmName("bxwiyiaupqngjuae")
    public suspend fun placement(`value`: PagesProjectDeploymentConfigsProductionPlacementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.placement = mapped
    }

    /**
     * @param argument Configuration for placement in the Cloudflare Pages project.
     */
    @JvmName("txxnyoabrqgibikl")
    public suspend fun placement(argument: suspend PagesProjectDeploymentConfigsProductionPlacementArgsBuilder.() -> Unit) {
        val toBeMapped = PagesProjectDeploymentConfigsProductionPlacementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.placement = mapped
    }

    /**
     * @param value R2 Buckets used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("hgwaoaidmqsxhljn")
    public suspend fun r2Buckets(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.r2Buckets = mapped
    }

    /**
     * @param values R2 Buckets used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("ccikmwwgaajryxjx")
    public fun r2Buckets(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.r2Buckets = mapped
    }

    /**
     * @param value Encrypted environment variables for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("xahquccpscioxxlc")
    public suspend fun secrets(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param values Encrypted environment variables for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("uwukqjvptedscolk")
    public fun secrets(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param value Services used for Pages Functions.
     */
    @JvmName("hqmudssxswjoovib")
    public suspend fun serviceBindings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceBindings = mapped
    }

    /**
     * @param argument Services used for Pages Functions.
     */
    @JvmName("ibmjcsrmtwbpscmi")
    public suspend fun serviceBindings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PagesProjectDeploymentConfigsProductionServiceBindingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.serviceBindings = mapped
    }

    /**
     * @param argument Services used for Pages Functions.
     */
    @JvmName("ckjlusahgyycwakn")
    public suspend fun serviceBindings(vararg argument: suspend PagesProjectDeploymentConfigsProductionServiceBindingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PagesProjectDeploymentConfigsProductionServiceBindingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.serviceBindings = mapped
    }

    /**
     * @param argument Services used for Pages Functions.
     */
    @JvmName("cgqarbxylopngygj")
    public suspend fun serviceBindings(argument: suspend PagesProjectDeploymentConfigsProductionServiceBindingArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                PagesProjectDeploymentConfigsProductionServiceBindingArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.serviceBindings = mapped
    }

    /**
     * @param values Services used for Pages Functions.
     */
    @JvmName("gyyyjpqvfkxbpdvt")
    public suspend fun serviceBindings(vararg values: PagesProjectDeploymentConfigsProductionServiceBindingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serviceBindings = mapped
    }

    /**
     * @param value Usage model used for Pages Functions. Available values: `unbound`, `bundled`, `standard`. Defaults to `bundled`.
     */
    @JvmName("vtvxrjpywcvejamd")
    public suspend fun usageModel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.usageModel = mapped
    }

    internal fun build(): PagesProjectDeploymentConfigsProductionArgs =
        PagesProjectDeploymentConfigsProductionArgs(
            alwaysUseLatestCompatibilityDate = alwaysUseLatestCompatibilityDate,
            compatibilityDate = compatibilityDate,
            compatibilityFlags = compatibilityFlags,
            d1Databases = d1Databases,
            durableObjectNamespaces = durableObjectNamespaces,
            environmentVariables = environmentVariables,
            failOpen = failOpen,
            kvNamespaces = kvNamespaces,
            placement = placement,
            r2Buckets = r2Buckets,
            secrets = secrets,
            serviceBindings = serviceBindings,
            usageModel = usageModel,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy