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

com.pulumi.cloudflare.kotlin.inputs.PagesProjectDeploymentConfigsPreviewArgs.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: 5.40.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin.inputs

import com.pulumi.cloudflare.inputs.PagesProjectDeploymentConfigsPreviewArgs.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 PagesProjectDeploymentConfigsPreviewArgs(
    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.PagesProjectDeploymentConfigsPreviewArgs =
        com.pulumi.cloudflare.inputs.PagesProjectDeploymentConfigsPreviewArgs.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 [PagesProjectDeploymentConfigsPreviewArgs].
 */
@PulumiTagMarker
public class PagesProjectDeploymentConfigsPreviewArgsBuilder 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("cmounpxnykbxbjyx")
    public suspend fun alwaysUseLatestCompatibilityDate(`value`: Output) {
        this.alwaysUseLatestCompatibilityDate = value
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @param values Services used for Pages Functions.
     */
    @JvmName("xbrqjpsxpxdthuah")
    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("rrvhxjabmljnxdyl")
    public suspend fun usageModel(`value`: Output) {
        this.usageModel = value
    }

    /**
     * @param value Use latest compatibility date for Pages Functions. Defaults to `false`.
     */
    @JvmName("kuaqqbcniiescwsc")
    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("ofcktwevqhchygun")
    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("slqxspycwmmdhhgq")
    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("bplwhpuruftilanm")
    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("fgnlmylshqrpvatv")
    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("whkqpcncocxyterm")
    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("esmwlqvjewdckikn")
    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("hcllguvfdfnmekml")
    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("ledeejopefbqwdwp")
    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("rgjxqtptndqheqof")
    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("krmaijichommtqif")
    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("yjvhmojbfatpqxvy")
    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("nswheeqlalerpvef")
    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("nyjmvywqnltqgonh")
    public suspend fun placement(`value`: PagesProjectDeploymentConfigsPreviewPlacementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.placement = mapped
    }

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

    /**
     * @param value R2 Buckets used for Pages Functions. Defaults to `map[]`.
     */
    @JvmName("lfiidjbrswdfkqoi")
    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("ylednrxjahjtkbox")
    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("wsqfwfckmtpuweeh")
    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("yguxeilooubiibok")
    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("jxmpcndcatswjgtc")
    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("doawtirfxnqjlqit")
    public suspend fun serviceBindings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PagesProjectDeploymentConfigsPreviewServiceBindingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.serviceBindings = mapped
    }

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

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

    /**
     * @param values Services used for Pages Functions.
     */
    @JvmName("jovxvfippeohdkmn")
    public suspend fun serviceBindings(vararg values: PagesProjectDeploymentConfigsPreviewServiceBindingArgs) {
        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("guwdvaopjqbqkgbj")
    public suspend fun usageModel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.usageModel = mapped
    }

    internal fun build(): PagesProjectDeploymentConfigsPreviewArgs =
        PagesProjectDeploymentConfigsPreviewArgs(
            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