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

com.pulumi.googlenative.firebasehosting.v1beta1.kotlin.inputs.HeaderArgs.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.googlenative.firebasehosting.v1beta1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.firebasehosting.v1beta1.inputs.HeaderArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A [`Header`](https://firebase.google.com/docs/hosting/full-config#headers) specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
 * @property glob The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
 * @property headers The additional headers to add to the response.
 * @property regex The user-supplied RE2 regular expression to match against the request URL path.
 */
public data class HeaderArgs(
    public val glob: Output? = null,
    public val headers: Output>,
    public val regex: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.firebasehosting.v1beta1.inputs.HeaderArgs =
        com.pulumi.googlenative.firebasehosting.v1beta1.inputs.HeaderArgs.builder()
            .glob(glob?.applyValue({ args0 -> args0 }))
            .headers(headers.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .regex(regex?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HeaderArgs].
 */
@PulumiTagMarker
public class HeaderArgsBuilder internal constructor() {
    private var glob: Output? = null

    private var headers: Output>? = null

    private var regex: Output? = null

    /**
     * @param value The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
     */
    @JvmName("dctebqejhmyqrvuy")
    public suspend fun glob(`value`: Output) {
        this.glob = value
    }

    /**
     * @param value The additional headers to add to the response.
     */
    @JvmName("bfbdweieniyodvih")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

    /**
     * @param value The user-supplied RE2 regular expression to match against the request URL path.
     */
    @JvmName("qlcfjwbkjgtlowoa")
    public suspend fun regex(`value`: Output) {
        this.regex = value
    }

    /**
     * @param value The user-supplied [glob](https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching) to match against the request URL path.
     */
    @JvmName("xxlahesmhowpgjay")
    public suspend fun glob(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.glob = mapped
    }

    /**
     * @param value The additional headers to add to the response.
     */
    @JvmName("tnbxfaslehkqorje")
    public suspend fun headers(`value`: Map) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param values The additional headers to add to the response.
     */
    @JvmName("xknlvyxfmhvjkmix")
    public fun headers(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value The user-supplied RE2 regular expression to match against the request URL path.
     */
    @JvmName("nsrsmsbjrljrmbfg")
    public suspend fun regex(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regex = mapped
    }

    internal fun build(): HeaderArgs = HeaderArgs(
        glob = glob,
        headers = headers ?: throw PulumiNullFieldException("headers"),
        regex = regex,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy