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.

The 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("dderfncbxxvxfapf")
    public suspend fun alwaysUseLatestCompatibilityDate(`value`: Output) {
        this.alwaysUseLatestCompatibilityDate = value
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @param value Use latest compatibility date for Pages Functions. Defaults to `false`.
     */
    @JvmName("uxjgrqgwahqnmken")
    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("gyofrcbvvqgufiau")
    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("rirwavuishtokapn")
    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("jimrsgwhconpmjlg")
    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("ysyugdfslveebixq")
    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("fgudoviitsaipxma")
    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("tjngqlwebptghuyl")
    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("ljwcmsrqbaiwdimm")
    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("kfmvncxlsxawcwtc")
    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("awtcpxsaniqhpyiu")
    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("tyvvyyenisvpovhx")
    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("awbftvymhpwahtri")
    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("ficshloarvnxfnno")
    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("xsauxmdghrvfsxnw")
    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("yfmfjfsyxlaipgsl")
    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("kgjdgoxhlkfgemwn")
    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("bbuwpnlwgeukjhfg")
    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("wcdilqeauggmsvgn")
    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("cxsbcnagukvcxsvf")
    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("vhnpupaqxnmsjlil")
    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("mywvuistpwpufgxj")
    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("cwggvoaypfdyasaf")
    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("parjkubjjtblngeu")
    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("ltlwnpfphfcjlmon")
    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("fjsxhydddnrgusrx")
    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