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

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

/**
 *
 * @property headers List of HTTP headers maps to match the origin response on.
 * @property originTraffic Only count traffic that has come from your origin servers. If true, cached items that Cloudflare serve will not count towards rate limiting.
 * @property statuses HTTP Status codes, can be one, many or indicate all by not providing this value.
 */
public data class RateLimitMatchResponseArgs(
    public val headers: Output>>? = null,
    public val originTraffic: Output? = null,
    public val statuses: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.RateLimitMatchResponseArgs =
        com.pulumi.cloudflare.inputs.RateLimitMatchResponseArgs.builder()
            .headers(
                headers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.map({ args0 ->
                            args0.key.to(args0.value)
                        }).toMap()
                    })
                }),
            )
            .originTraffic(originTraffic?.applyValue({ args0 -> args0 }))
            .statuses(statuses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var originTraffic: Output? = null

    private var statuses: Output>? = null

    /**
     * @param value List of HTTP headers maps to match the origin response on.
     */
    @JvmName("ewcfpkuawlbvsjve")
    public suspend fun headers(`value`: Output>>) {
        this.headers = value
    }

    @JvmName("jjbnamepytsnthws")
    public suspend fun headers(vararg values: Output>) {
        this.headers = Output.all(values.asList())
    }

    /**
     * @param values List of HTTP headers maps to match the origin response on.
     */
    @JvmName("vtwslhmqpoorpdix")
    public suspend fun headers(values: List>>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value Only count traffic that has come from your origin servers. If true, cached items that Cloudflare serve will not count towards rate limiting.
     */
    @JvmName("nfokgmasuuywrtay")
    public suspend fun originTraffic(`value`: Output) {
        this.originTraffic = value
    }

    /**
     * @param value HTTP Status codes, can be one, many or indicate all by not providing this value.
     */
    @JvmName("dvfacxaqgtnmtmoo")
    public suspend fun statuses(`value`: Output>) {
        this.statuses = value
    }

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

    /**
     * @param values HTTP Status codes, can be one, many or indicate all by not providing this value.
     */
    @JvmName("jbmiltowvovkfrqc")
    public suspend fun statuses(values: List>) {
        this.statuses = Output.all(values)
    }

    /**
     * @param value List of HTTP headers maps to match the origin response on.
     */
    @JvmName("dgogjcqlwowfbdgv")
    public suspend fun headers(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param values List of HTTP headers maps to match the origin response on.
     */
    @JvmName("ttmmskkhnaxyihui")
    public suspend fun headers(vararg values: Map) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value Only count traffic that has come from your origin servers. If true, cached items that Cloudflare serve will not count towards rate limiting.
     */
    @JvmName("embftbpnbvnummal")
    public suspend fun originTraffic(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.originTraffic = mapped
    }

    /**
     * @param value HTTP Status codes, can be one, many or indicate all by not providing this value.
     */
    @JvmName("rwadfxfonpuctclm")
    public suspend fun statuses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statuses = mapped
    }

    /**
     * @param values HTTP Status codes, can be one, many or indicate all by not providing this value.
     */
    @JvmName("yueogerwmpjpgfbr")
    public suspend fun statuses(vararg values: Int) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statuses = mapped
    }

    internal fun build(): RateLimitMatchResponseArgs = RateLimitMatchResponseArgs(
        headers = headers,
        originTraffic = originTraffic,
        statuses = statuses,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy