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

com.pulumi.azurenative.cdn.kotlin.inputs.PolicySettingsArgs.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.PolicySettingsArgs.builder
import com.pulumi.azurenative.cdn.kotlin.enums.PolicyEnabledState
import com.pulumi.azurenative.cdn.kotlin.enums.PolicyMode
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Defines contents of a web application firewall global configuration
 * @property defaultCustomBlockResponseBody If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
 * @property defaultCustomBlockResponseStatusCode If the action type is block, this field defines the default customer overridable http response status code.
 * @property defaultRedirectUrl If action type is redirect, this field represents the default redirect URL for the client.
 * @property enabledState describes if the policy is in enabled state or disabled state
 * @property mode Describes if it is in detection mode or prevention mode at policy level.
 */
public data class PolicySettingsArgs(
    public val defaultCustomBlockResponseBody: Output? = null,
    public val defaultCustomBlockResponseStatusCode: Output? = null,
    public val defaultRedirectUrl: Output? = null,
    public val enabledState: Output>? = null,
    public val mode: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cdn.inputs.PolicySettingsArgs =
        com.pulumi.azurenative.cdn.inputs.PolicySettingsArgs.builder()
            .defaultCustomBlockResponseBody(defaultCustomBlockResponseBody?.applyValue({ args0 -> args0 }))
            .defaultCustomBlockResponseStatusCode(
                defaultCustomBlockResponseStatusCode?.applyValue({ args0 ->
                    args0
                }),
            )
            .defaultRedirectUrl(defaultRedirectUrl?.applyValue({ args0 -> args0 }))
            .enabledState(
                enabledState?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .mode(
                mode?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [PolicySettingsArgs].
 */
@PulumiTagMarker
public class PolicySettingsArgsBuilder internal constructor() {
    private var defaultCustomBlockResponseBody: Output? = null

    private var defaultCustomBlockResponseStatusCode: Output? = null

    private var defaultRedirectUrl: Output? = null

    private var enabledState: Output>? = null

    private var mode: Output>? = null

    /**
     * @param value If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
     */
    @JvmName("ojefqlpbrhxiwguf")
    public suspend fun defaultCustomBlockResponseBody(`value`: Output) {
        this.defaultCustomBlockResponseBody = value
    }

    /**
     * @param value If the action type is block, this field defines the default customer overridable http response status code.
     */
    @JvmName("geeoogoekqgltawt")
    public suspend fun defaultCustomBlockResponseStatusCode(`value`: Output) {
        this.defaultCustomBlockResponseStatusCode = value
    }

    /**
     * @param value If action type is redirect, this field represents the default redirect URL for the client.
     */
    @JvmName("vfamxfyssbujmdxp")
    public suspend fun defaultRedirectUrl(`value`: Output) {
        this.defaultRedirectUrl = value
    }

    /**
     * @param value describes if the policy is in enabled state or disabled state
     */
    @JvmName("nxrocsnbgwjcihpx")
    public suspend fun enabledState(`value`: Output>) {
        this.enabledState = value
    }

    /**
     * @param value Describes if it is in detection mode or prevention mode at policy level.
     */
    @JvmName("ylggqtauqhghcesu")
    public suspend fun mode(`value`: Output>) {
        this.mode = value
    }

    /**
     * @param value If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
     */
    @JvmName("ucxeqdideyuvhund")
    public suspend fun defaultCustomBlockResponseBody(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultCustomBlockResponseBody = mapped
    }

    /**
     * @param value If the action type is block, this field defines the default customer overridable http response status code.
     */
    @JvmName("jvitpaklhjrmwvta")
    public suspend fun defaultCustomBlockResponseStatusCode(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultCustomBlockResponseStatusCode = mapped
    }

    /**
     * @param value If action type is redirect, this field represents the default redirect URL for the client.
     */
    @JvmName("ycpneqfqykxovtwj")
    public suspend fun defaultRedirectUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultRedirectUrl = mapped
    }

    /**
     * @param value describes if the policy is in enabled state or disabled state
     */
    @JvmName("qfmsifbedwvagsst")
    public suspend fun enabledState(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabledState = mapped
    }

    /**
     * @param value describes if the policy is in enabled state or disabled state
     */
    @JvmName("otakxieygylkifet")
    public fun enabledState(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabledState = mapped
    }

    /**
     * @param value describes if the policy is in enabled state or disabled state
     */
    @JvmName("rxxnqprwdvkrvxbc")
    public fun enabledState(`value`: PolicyEnabledState) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabledState = mapped
    }

    /**
     * @param value Describes if it is in detection mode or prevention mode at policy level.
     */
    @JvmName("gmjsewekdlwiuhfw")
    public suspend fun mode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Describes if it is in detection mode or prevention mode at policy level.
     */
    @JvmName("mdulxhuevagvcmie")
    public fun mode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Describes if it is in detection mode or prevention mode at policy level.
     */
    @JvmName("rbsskoruuywxxcey")
    public fun mode(`value`: PolicyMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    internal fun build(): PolicySettingsArgs = PolicySettingsArgs(
        defaultCustomBlockResponseBody = defaultCustomBlockResponseBody,
        defaultCustomBlockResponseStatusCode = defaultCustomBlockResponseStatusCode,
        defaultRedirectUrl = defaultRedirectUrl,
        enabledState = enabledState,
        mode = mode,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy