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

com.pulumi.cloudflare.kotlin.inputs.RulesetRuleActionParametersEdgeTtlArgs.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.RulesetRuleActionParametersEdgeTtlArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property default Default edge TTL.
 * @property mode Mode of the edge TTL. Available values: `override_origin`, `respect_origin`, `bypass_by_default`
 * @property statusCodeTtls Edge TTL for the status codes.
 */
public data class RulesetRuleActionParametersEdgeTtlArgs(
    public val default: Output? = null,
    public val mode: Output,
    public val statusCodeTtls: Output>? =
        null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.RulesetRuleActionParametersEdgeTtlArgs =
        com.pulumi.cloudflare.inputs.RulesetRuleActionParametersEdgeTtlArgs.builder()
            .default_(default?.applyValue({ args0 -> args0 }))
            .mode(mode.applyValue({ args0 -> args0 }))
            .statusCodeTtls(
                statusCodeTtls?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [RulesetRuleActionParametersEdgeTtlArgs].
 */
@PulumiTagMarker
public class RulesetRuleActionParametersEdgeTtlArgsBuilder internal constructor() {
    private var default: Output? = null

    private var mode: Output? = null

    private var statusCodeTtls: Output>? =
        null

    /**
     * @param value Default edge TTL.
     */
    @JvmName("nohdlfkvmdqhsnpk")
    public suspend fun default(`value`: Output) {
        this.default = value
    }

    /**
     * @param value Mode of the edge TTL. Available values: `override_origin`, `respect_origin`, `bypass_by_default`
     */
    @JvmName("vcibymwgtaxoyunf")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value Edge TTL for the status codes.
     */
    @JvmName("mnuuqnjymseqnywn")
    public suspend fun statusCodeTtls(`value`: Output>) {
        this.statusCodeTtls = value
    }

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

    /**
     * @param values Edge TTL for the status codes.
     */
    @JvmName("ytvsdmqhsuoahtmf")
    public suspend fun statusCodeTtls(values: List>) {
        this.statusCodeTtls = Output.all(values)
    }

    /**
     * @param value Default edge TTL.
     */
    @JvmName("esmoipiavreyifme")
    public suspend fun default(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.default = mapped
    }

    /**
     * @param value Mode of the edge TTL. Available values: `override_origin`, `respect_origin`, `bypass_by_default`
     */
    @JvmName("iotahrqabwqrbenj")
    public suspend fun mode(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Edge TTL for the status codes.
     */
    @JvmName("miaafxjncumemvjj")
    public suspend fun statusCodeTtls(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statusCodeTtls = mapped
    }

    /**
     * @param argument Edge TTL for the status codes.
     */
    @JvmName("xgknhpjinpbyocsj")
    public suspend fun statusCodeTtls(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RulesetRuleActionParametersEdgeTtlStatusCodeTtlArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statusCodeTtls = mapped
    }

    /**
     * @param argument Edge TTL for the status codes.
     */
    @JvmName("evxhtwarkotdakfh")
    public suspend fun statusCodeTtls(vararg argument: suspend RulesetRuleActionParametersEdgeTtlStatusCodeTtlArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RulesetRuleActionParametersEdgeTtlStatusCodeTtlArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statusCodeTtls = mapped
    }

    /**
     * @param argument Edge TTL for the status codes.
     */
    @JvmName("cvbyhgamvqpluhat")
    public suspend fun statusCodeTtls(argument: suspend RulesetRuleActionParametersEdgeTtlStatusCodeTtlArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                RulesetRuleActionParametersEdgeTtlStatusCodeTtlArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.statusCodeTtls = mapped
    }

    /**
     * @param values Edge TTL for the status codes.
     */
    @JvmName("gmdwqnsfiuliurka")
    public suspend fun statusCodeTtls(vararg values: RulesetRuleActionParametersEdgeTtlStatusCodeTtlArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statusCodeTtls = mapped
    }

    internal fun build(): RulesetRuleActionParametersEdgeTtlArgs =
        RulesetRuleActionParametersEdgeTtlArgs(
            default = default,
            mode = mode ?: throw PulumiNullFieldException("mode"),
            statusCodeTtls = statusCodeTtls,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy