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

com.pulumi.azurenative.cdn.kotlin.inputs.DeliveryRuleArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.cdn.kotlin.inputs

import com.pulumi.azurenative.cdn.inputs.DeliveryRuleArgs.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 kotlin.Any
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A rule that specifies a set of actions and conditions
 * @property actions A list of actions that are executed when all the conditions of a rule are satisfied.
 * @property conditions A list of conditions that must be matched for the actions to be executed
 * @property name Name of the rule
 * @property order The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
 */
public data class DeliveryRuleArgs(
    public val actions: Output>,
    public val conditions: Output>? = null,
    public val name: Output? = null,
    public val order: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cdn.inputs.DeliveryRuleArgs =
        com.pulumi.azurenative.cdn.inputs.DeliveryRuleArgs.builder()
            .actions(actions.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .conditions(conditions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .order(order.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DeliveryRuleArgs].
 */
@PulumiTagMarker
public class DeliveryRuleArgsBuilder internal constructor() {
    private var actions: Output>? = null

    private var conditions: Output>? = null

    private var name: Output? = null

    private var order: Output? = null

    /**
     * @param value A list of actions that are executed when all the conditions of a rule are satisfied.
     */
    @JvmName("qrpjxfnhttrtmmqq")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values A list of actions that are executed when all the conditions of a rule are satisfied.
     */
    @JvmName("cmcwatsxtbnjoubg")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

    /**
     * @param value A list of conditions that must be matched for the actions to be executed
     */
    @JvmName("oqbmubmbqhusqqsw")
    public suspend fun conditions(`value`: Output>) {
        this.conditions = value
    }

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

    /**
     * @param values A list of conditions that must be matched for the actions to be executed
     */
    @JvmName("fevdvescnarruxbf")
    public suspend fun conditions(values: List>) {
        this.conditions = Output.all(values)
    }

    /**
     * @param value Name of the rule
     */
    @JvmName("rlsmquqpbewmmwjw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
     */
    @JvmName("fvlpnpykxasufdmy")
    public suspend fun order(`value`: Output) {
        this.order = value
    }

    /**
     * @param value A list of actions that are executed when all the conditions of a rule are satisfied.
     */
    @JvmName("ujtpqqdrdweoivaj")
    public suspend fun actions(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param values A list of actions that are executed when all the conditions of a rule are satisfied.
     */
    @JvmName("ctjonevmwujjwxvp")
    public suspend fun actions(vararg values: Any) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value A list of conditions that must be matched for the actions to be executed
     */
    @JvmName("cpugofkfefthybku")
    public suspend fun conditions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param values A list of conditions that must be matched for the actions to be executed
     */
    @JvmName("srrypwpvdmgqlnnp")
    public suspend fun conditions(vararg values: Any) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param value Name of the rule
     */
    @JvmName("bkowwefxhpjvlkdq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
     */
    @JvmName("belfwyelxkoolfpj")
    public suspend fun order(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.order = mapped
    }

    internal fun build(): DeliveryRuleArgs = DeliveryRuleArgs(
        actions = actions ?: throw PulumiNullFieldException("actions"),
        conditions = conditions,
        name = name,
        order = order ?: throw PulumiNullFieldException("order"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy