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

com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRule.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.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property condition The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See [load balancing rules](https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules).
 * @property disabled A disabled rule will not be executed.
 * @property fixedResponse Settings for a HTTP response to return directly to the eyeball if the condition is true. Note: `overrides` or `fixed_response` must be set.
 * @property name Human readable name for this rule.
 * @property overrides The load balancer settings to alter if this rule's `condition` is true. Note: `overrides` or `fixed_response` must be set.
 * @property priority Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
 * @property terminates Terminates indicates that if this rule is true no further rules should be executed. Note: setting a `fixed_response` forces this field to `true`.
 */
public data class LoadBalancerRule(
    public val condition: String? = null,
    public val disabled: Boolean? = null,
    public val fixedResponse: LoadBalancerRuleFixedResponse? = null,
    public val name: String,
    public val overrides: List? = null,
    public val priority: Int? = null,
    public val terminates: Boolean? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.cloudflare.outputs.LoadBalancerRule): LoadBalancerRule = LoadBalancerRule(
            condition = javaType.condition().map({ args0 -> args0 }).orElse(null),
            disabled = javaType.disabled().map({ args0 -> args0 }).orElse(null),
            fixedResponse = javaType.fixedResponse().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleFixedResponse.Companion.toKotlin(args0)
                })
            }).orElse(null),
            name = javaType.name(),
            overrides = javaType.overrides().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverride.Companion.toKotlin(args0)
                })
            }),
            priority = javaType.priority().map({ args0 -> args0 }).orElse(null),
            terminates = javaType.terminates().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy