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

com.pulumi.gcp.firebase.kotlin.inputs.HostingVersionConfigArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.firebase.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property redirects An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
 * triggers Hosting to respond with a redirect to the specified destination path.
 * Structure is documented below.
 * @property rewrites An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
 * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
 * Structure is documented below.
 */
public data class HostingVersionConfigArgs(
    public val redirects: Output>? = null,
    public val rewrites: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs =
        com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs.builder()
            .redirects(
                redirects?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .rewrites(
                rewrites?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var rewrites: Output>? = null

    /**
     * @param value An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
     * triggers Hosting to respond with a redirect to the specified destination path.
     * Structure is documented below.
     */
    @JvmName("igboysjfrenhaift")
    public suspend fun redirects(`value`: Output>) {
        this.redirects = value
    }

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

    /**
     * @param values An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
     * triggers Hosting to respond with a redirect to the specified destination path.
     * Structure is documented below.
     */
    @JvmName("ymlagwqbbhmxontt")
    public suspend fun redirects(values: List>) {
        this.redirects = Output.all(values)
    }

    /**
     * @param value An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
     * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
     * Structure is documented below.
     */
    @JvmName("mnxaqurrpoxavjix")
    public suspend fun rewrites(`value`: Output>) {
        this.rewrites = value
    }

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

    /**
     * @param values An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
     * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
     * Structure is documented below.
     */
    @JvmName("fjbdxkjevkgcnfdm")
    public suspend fun rewrites(values: List>) {
        this.rewrites = Output.all(values)
    }

    /**
     * @param value An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
     * triggers Hosting to respond with a redirect to the specified destination path.
     * Structure is documented below.
     */
    @JvmName("sqxdpldqxlrebcfn")
    public suspend fun redirects(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.redirects = mapped
    }

    /**
     * @param argument An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
     * triggers Hosting to respond with a redirect to the specified destination path.
     * Structure is documented below.
     */
    @JvmName("rkdftdlhvkuwobdr")
    public suspend fun redirects(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            HostingVersionConfigRedirectArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.redirects = mapped
    }

    /**
     * @param argument An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
     * triggers Hosting to respond with a redirect to the specified destination path.
     * Structure is documented below.
     */
    @JvmName("ruieedwgxlnrikkv")
    public suspend fun redirects(vararg argument: suspend HostingVersionConfigRedirectArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            HostingVersionConfigRedirectArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.redirects = mapped
    }

    /**
     * @param argument An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
     * triggers Hosting to respond with a redirect to the specified destination path.
     * Structure is documented below.
     */
    @JvmName("eepjdfqqblnwvtff")
    public suspend fun redirects(argument: suspend HostingVersionConfigRedirectArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            HostingVersionConfigRedirectArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.redirects = mapped
    }

    /**
     * @param values An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path,
     * triggers Hosting to respond with a redirect to the specified destination path.
     * Structure is documented below.
     */
    @JvmName("mhsiknptbyoqaxxl")
    public suspend fun redirects(vararg values: HostingVersionConfigRedirectArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.redirects = mapped
    }

    /**
     * @param value An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
     * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
     * Structure is documented below.
     */
    @JvmName("darvabgqvrqnqrhb")
    public suspend fun rewrites(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rewrites = mapped
    }

    /**
     * @param argument An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
     * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
     * Structure is documented below.
     */
    @JvmName("baqmasdmillonqmg")
    public suspend fun rewrites(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            HostingVersionConfigRewriteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rewrites = mapped
    }

    /**
     * @param argument An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
     * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
     * Structure is documented below.
     */
    @JvmName("ithftpjbelnhbatm")
    public suspend fun rewrites(vararg argument: suspend HostingVersionConfigRewriteArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            HostingVersionConfigRewriteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rewrites = mapped
    }

    /**
     * @param argument An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
     * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
     * Structure is documented below.
     */
    @JvmName("rbihpgmbidytvnkq")
    public suspend fun rewrites(argument: suspend HostingVersionConfigRewriteArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            HostingVersionConfigRewriteArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.rewrites = mapped
    }

    /**
     * @param values An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the
     * request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
     * Structure is documented below.
     */
    @JvmName("yycqybaauytoedbd")
    public suspend fun rewrites(vararg values: HostingVersionConfigRewriteArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rewrites = mapped
    }

    internal fun build(): HostingVersionConfigArgs = HostingVersionConfigArgs(
        redirects = redirects,
        rewrites = rewrites,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy