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

com.pulumi.azurenative.web.kotlin.inputs.AutoHealTriggersArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.web.kotlin.inputs

import com.pulumi.azurenative.web.inputs.AutoHealTriggersArgs.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.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Triggers for auto-heal.
 * @property privateBytesInKB A rule based on private bytes.
 * @property requests A rule based on total requests.
 * @property slowRequests A rule based on request execution time.
 * @property slowRequestsWithPath A rule based on multiple Slow Requests Rule with path
 * @property statusCodes A rule based on status codes.
 * @property statusCodesRange A rule based on status codes ranges.
 */
public data class AutoHealTriggersArgs(
    public val privateBytesInKB: Output? = null,
    public val requests: Output? = null,
    public val slowRequests: Output? = null,
    public val slowRequestsWithPath: Output>? = null,
    public val statusCodes: Output>? = null,
    public val statusCodesRange: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.inputs.AutoHealTriggersArgs =
        com.pulumi.azurenative.web.inputs.AutoHealTriggersArgs.builder()
            .privateBytesInKB(privateBytesInKB?.applyValue({ args0 -> args0 }))
            .requests(requests?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .slowRequests(slowRequests?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .slowRequestsWithPath(
                slowRequestsWithPath?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .statusCodes(
                statusCodes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .statusCodesRange(
                statusCodesRange?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AutoHealTriggersArgs].
 */
@PulumiTagMarker
public class AutoHealTriggersArgsBuilder internal constructor() {
    private var privateBytesInKB: Output? = null

    private var requests: Output? = null

    private var slowRequests: Output? = null

    private var slowRequestsWithPath: Output>? = null

    private var statusCodes: Output>? = null

    private var statusCodesRange: Output>? = null

    /**
     * @param value A rule based on private bytes.
     */
    @JvmName("gvusspvrjcqcassm")
    public suspend fun privateBytesInKB(`value`: Output) {
        this.privateBytesInKB = value
    }

    /**
     * @param value A rule based on total requests.
     */
    @JvmName("rteevhabpckmumok")
    public suspend fun requests(`value`: Output) {
        this.requests = value
    }

    /**
     * @param value A rule based on request execution time.
     */
    @JvmName("aotwcbmpwutqgrjo")
    public suspend fun slowRequests(`value`: Output) {
        this.slowRequests = value
    }

    /**
     * @param value A rule based on multiple Slow Requests Rule with path
     */
    @JvmName("iwcrggkvgmkqpwrm")
    public suspend fun slowRequestsWithPath(`value`: Output>) {
        this.slowRequestsWithPath = value
    }

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

    /**
     * @param values A rule based on multiple Slow Requests Rule with path
     */
    @JvmName("swoxccjhixpvnsxd")
    public suspend fun slowRequestsWithPath(values: List>) {
        this.slowRequestsWithPath = Output.all(values)
    }

    /**
     * @param value A rule based on status codes.
     */
    @JvmName("svxofnebjtmyloxf")
    public suspend fun statusCodes(`value`: Output>) {
        this.statusCodes = value
    }

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

    /**
     * @param values A rule based on status codes.
     */
    @JvmName("jbloufkwpbftnwfw")
    public suspend fun statusCodes(values: List>) {
        this.statusCodes = Output.all(values)
    }

    /**
     * @param value A rule based on status codes ranges.
     */
    @JvmName("pkbmkkmxktmpeeux")
    public suspend fun statusCodesRange(`value`: Output>) {
        this.statusCodesRange = value
    }

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

    /**
     * @param values A rule based on status codes ranges.
     */
    @JvmName("cmkbahukjdqmhylw")
    public suspend fun statusCodesRange(values: List>) {
        this.statusCodesRange = Output.all(values)
    }

    /**
     * @param value A rule based on private bytes.
     */
    @JvmName("ryrsvasqjkmljxvr")
    public suspend fun privateBytesInKB(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateBytesInKB = mapped
    }

    /**
     * @param value A rule based on total requests.
     */
    @JvmName("xqmmgvxmsoabxgac")
    public suspend fun requests(`value`: RequestsBasedTriggerArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requests = mapped
    }

    /**
     * @param argument A rule based on total requests.
     */
    @JvmName("soxspamaauotqfdi")
    public suspend fun requests(argument: suspend RequestsBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = RequestsBasedTriggerArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

    /**
     * @param value A rule based on request execution time.
     */
    @JvmName("ihviyfhosnjicnuw")
    public suspend fun slowRequests(`value`: SlowRequestsBasedTriggerArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slowRequests = mapped
    }

    /**
     * @param argument A rule based on request execution time.
     */
    @JvmName("lroqgbscsalnvefn")
    public suspend fun slowRequests(argument: suspend SlowRequestsBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = SlowRequestsBasedTriggerArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.slowRequests = mapped
    }

    /**
     * @param value A rule based on multiple Slow Requests Rule with path
     */
    @JvmName("jatkltvvvyvscxql")
    public suspend fun slowRequestsWithPath(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slowRequestsWithPath = mapped
    }

    /**
     * @param argument A rule based on multiple Slow Requests Rule with path
     */
    @JvmName("bvxfcuwoihwdgyph")
    public suspend fun slowRequestsWithPath(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SlowRequestsBasedTriggerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.slowRequestsWithPath = mapped
    }

    /**
     * @param argument A rule based on multiple Slow Requests Rule with path
     */
    @JvmName("dxybnlddepakuhbi")
    public suspend fun slowRequestsWithPath(vararg argument: suspend SlowRequestsBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SlowRequestsBasedTriggerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.slowRequestsWithPath = mapped
    }

    /**
     * @param argument A rule based on multiple Slow Requests Rule with path
     */
    @JvmName("dsqpgdxipdvpukej")
    public suspend fun slowRequestsWithPath(argument: suspend SlowRequestsBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SlowRequestsBasedTriggerArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.slowRequestsWithPath = mapped
    }

    /**
     * @param values A rule based on multiple Slow Requests Rule with path
     */
    @JvmName("jlwaeqkjuquoahpv")
    public suspend fun slowRequestsWithPath(vararg values: SlowRequestsBasedTriggerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.slowRequestsWithPath = mapped
    }

    /**
     * @param value A rule based on status codes.
     */
    @JvmName("nfdybsrwsoclwmpx")
    public suspend fun statusCodes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statusCodes = mapped
    }

    /**
     * @param argument A rule based on status codes.
     */
    @JvmName("aquimmsrpjwhqpkj")
    public suspend fun statusCodes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            StatusCodesBasedTriggerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.statusCodes = mapped
    }

    /**
     * @param argument A rule based on status codes.
     */
    @JvmName("rlhvrxneeptuwbsv")
    public suspend fun statusCodes(vararg argument: suspend StatusCodesBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            StatusCodesBasedTriggerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.statusCodes = mapped
    }

    /**
     * @param argument A rule based on status codes.
     */
    @JvmName("nirfiheawfhxfnqm")
    public suspend fun statusCodes(argument: suspend StatusCodesBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            StatusCodesBasedTriggerArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.statusCodes = mapped
    }

    /**
     * @param values A rule based on status codes.
     */
    @JvmName("ehmoljcdkamfpuot")
    public suspend fun statusCodes(vararg values: StatusCodesBasedTriggerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statusCodes = mapped
    }

    /**
     * @param value A rule based on status codes ranges.
     */
    @JvmName("ystqlnokydkoemlh")
    public suspend fun statusCodesRange(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statusCodesRange = mapped
    }

    /**
     * @param argument A rule based on status codes ranges.
     */
    @JvmName("cbbnsnehnqtpjver")
    public suspend fun statusCodesRange(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            StatusCodesRangeBasedTriggerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.statusCodesRange = mapped
    }

    /**
     * @param argument A rule based on status codes ranges.
     */
    @JvmName("mohettsahftxfpmw")
    public suspend fun statusCodesRange(vararg argument: suspend StatusCodesRangeBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            StatusCodesRangeBasedTriggerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.statusCodesRange = mapped
    }

    /**
     * @param argument A rule based on status codes ranges.
     */
    @JvmName("rsyeayyfapwsndct")
    public suspend fun statusCodesRange(argument: suspend StatusCodesRangeBasedTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            StatusCodesRangeBasedTriggerArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.statusCodesRange = mapped
    }

    /**
     * @param values A rule based on status codes ranges.
     */
    @JvmName("yrpjhybfwawaexrj")
    public suspend fun statusCodesRange(vararg values: StatusCodesRangeBasedTriggerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statusCodesRange = mapped
    }

    internal fun build(): AutoHealTriggersArgs = AutoHealTriggersArgs(
        privateBytesInKB = privateBytesInKB,
        requests = requests,
        slowRequests = slowRequests,
        slowRequestsWithPath = slowRequestsWithPath,
        statusCodes = statusCodes,
        statusCodesRange = statusCodesRange,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy