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

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

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RegionUrlMapPathMatcherArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property defaultService A reference to a RegionBackendService resource. This will be used if
 * none of the pathRules defined by this PathMatcher is matched by
 * the URL's path portion.
 * @property defaultUrlRedirect When none of the specified hostRules match, the request is redirected to a URL specified
 * by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or
 * defaultRouteAction must not be set.
 * Structure is documented below.
 * @property description An optional description of this resource.
 * @property name The name to which this PathMatcher is referred by the HostRule.
 * @property pathRules The list of path rules. Use this list instead of routeRules when routing based
 * on simple path matching is all that's required. The order by which path rules
 * are specified does not matter. Matches are always done on the longest-path-first
 * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
 * irrespective of the order in which those paths appear in this list. Within a
 * given pathMatcher, only one of pathRules or routeRules must be set.
 * Structure is documented below.
 * @property routeRules The list of ordered HTTP route rules. Use this list instead of pathRules when
 * advanced route matching and routing actions are desired. The order of specifying
 * routeRules matters: the first rule that matches will cause its specified routing
 * action to take effect. Within a given pathMatcher, only one of pathRules or
 * routeRules must be set. routeRules are not supported in UrlMaps intended for
 * External load balancers.
 * Structure is documented below.
 * */*/
 */
public data class RegionUrlMapPathMatcherArgs(
    public val defaultService: Output? = null,
    public val defaultUrlRedirect: Output? = null,
    public val description: Output? = null,
    public val name: Output,
    public val pathRules: Output>? = null,
    public val routeRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.RegionUrlMapPathMatcherArgs =
        com.pulumi.gcp.compute.inputs.RegionUrlMapPathMatcherArgs.builder()
            .defaultService(defaultService?.applyValue({ args0 -> args0 }))
            .defaultUrlRedirect(
                defaultUrlRedirect?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .pathRules(
                pathRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .routeRules(
                routeRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [RegionUrlMapPathMatcherArgs].
 */
@PulumiTagMarker
public class RegionUrlMapPathMatcherArgsBuilder internal constructor() {
    private var defaultService: Output? = null

    private var defaultUrlRedirect: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var pathRules: Output>? = null

    private var routeRules: Output>? = null

    /**
     * @param value A reference to a RegionBackendService resource. This will be used if
     * none of the pathRules defined by this PathMatcher is matched by
     * the URL's path portion.
     */
    @JvmName("betjvwohywbixubd")
    public suspend fun defaultService(`value`: Output) {
        this.defaultService = value
    }

    /**
     * @param value When none of the specified hostRules match, the request is redirected to a URL specified
     * by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or
     * defaultRouteAction must not be set.
     * Structure is documented below.
     */
    @JvmName("pcxlgenylmqepwlu")
    public suspend fun defaultUrlRedirect(`value`: Output) {
        this.defaultUrlRedirect = value
    }

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("hmlhrefiwjblbsmf")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name to which this PathMatcher is referred by the HostRule.
     */
    @JvmName("qxyplxtnogripsnh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The list of path rules. Use this list instead of routeRules when routing based
     * on simple path matching is all that's required. The order by which path rules
     * are specified does not matter. Matches are always done on the longest-path-first
     * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
     * irrespective of the order in which those paths appear in this list. Within a
     * given pathMatcher, only one of pathRules or routeRules must be set.
     * Structure is documented below.
     * */*/
     */
    @JvmName("smllbglsgcrhkona")
    public suspend fun pathRules(`value`: Output>) {
        this.pathRules = value
    }

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

    /**
     * @param values The list of path rules. Use this list instead of routeRules when routing based
     * on simple path matching is all that's required. The order by which path rules
     * are specified does not matter. Matches are always done on the longest-path-first
     * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
     * irrespective of the order in which those paths appear in this list. Within a
     * given pathMatcher, only one of pathRules or routeRules must be set.
     * Structure is documented below.
     * */*/
     */
    @JvmName("twnnhotfuyxkadcn")
    public suspend fun pathRules(values: List>) {
        this.pathRules = Output.all(values)
    }

    /**
     * @param value The list of ordered HTTP route rules. Use this list instead of pathRules when
     * advanced route matching and routing actions are desired. The order of specifying
     * routeRules matters: the first rule that matches will cause its specified routing
     * action to take effect. Within a given pathMatcher, only one of pathRules or
     * routeRules must be set. routeRules are not supported in UrlMaps intended for
     * External load balancers.
     * Structure is documented below.
     */
    @JvmName("vmiqjknsebmfwpkk")
    public suspend fun routeRules(`value`: Output>) {
        this.routeRules = value
    }

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

    /**
     * @param values The list of ordered HTTP route rules. Use this list instead of pathRules when
     * advanced route matching and routing actions are desired. The order of specifying
     * routeRules matters: the first rule that matches will cause its specified routing
     * action to take effect. Within a given pathMatcher, only one of pathRules or
     * routeRules must be set. routeRules are not supported in UrlMaps intended for
     * External load balancers.
     * Structure is documented below.
     */
    @JvmName("hialvwgygltiwgyw")
    public suspend fun routeRules(values: List>) {
        this.routeRules = Output.all(values)
    }

    /**
     * @param value A reference to a RegionBackendService resource. This will be used if
     * none of the pathRules defined by this PathMatcher is matched by
     * the URL's path portion.
     */
    @JvmName("qpiodvgeodjbsuuc")
    public suspend fun defaultService(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultService = mapped
    }

    /**
     * @param value When none of the specified hostRules match, the request is redirected to a URL specified
     * by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or
     * defaultRouteAction must not be set.
     * Structure is documented below.
     */
    @JvmName("naqhxcnmnygpnjil")
    public suspend fun defaultUrlRedirect(`value`: RegionUrlMapPathMatcherDefaultUrlRedirectArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultUrlRedirect = mapped
    }

    /**
     * @param argument When none of the specified hostRules match, the request is redirected to a URL specified
     * by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or
     * defaultRouteAction must not be set.
     * Structure is documented below.
     */
    @JvmName("hoibufcaynbupkvo")
    public suspend fun defaultUrlRedirect(argument: suspend RegionUrlMapPathMatcherDefaultUrlRedirectArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapPathMatcherDefaultUrlRedirectArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.defaultUrlRedirect = mapped
    }

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("pvnygyfcbuxiocjg")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The name to which this PathMatcher is referred by the HostRule.
     */
    @JvmName("pjcraudxsjbfykqb")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The list of path rules. Use this list instead of routeRules when routing based
     * on simple path matching is all that's required. The order by which path rules
     * are specified does not matter. Matches are always done on the longest-path-first
     * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
     * irrespective of the order in which those paths appear in this list. Within a
     * given pathMatcher, only one of pathRules or routeRules must be set.
     * Structure is documented below.
     * */*/
     */
    @JvmName("xnmjifhtpgyvjkpw")
    public suspend fun pathRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pathRules = mapped
    }

    /**
     * @param argument The list of path rules. Use this list instead of routeRules when routing based
     * on simple path matching is all that's required. The order by which path rules
     * are specified does not matter. Matches are always done on the longest-path-first
     * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
     * irrespective of the order in which those paths appear in this list. Within a
     * given pathMatcher, only one of pathRules or routeRules must be set.
     * Structure is documented below.
     * */*/
     */
    @JvmName("crhjnbfuhbjruauj")
    public suspend fun pathRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapPathMatcherPathRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.pathRules = mapped
    }

    /**
     * @param argument The list of path rules. Use this list instead of routeRules when routing based
     * on simple path matching is all that's required. The order by which path rules
     * are specified does not matter. Matches are always done on the longest-path-first
     * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
     * irrespective of the order in which those paths appear in this list. Within a
     * given pathMatcher, only one of pathRules or routeRules must be set.
     * Structure is documented below.
     * */*/
     */
    @JvmName("bdbdfnfopajoerlh")
    public suspend fun pathRules(vararg argument: suspend RegionUrlMapPathMatcherPathRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapPathMatcherPathRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.pathRules = mapped
    }

    /**
     * @param argument The list of path rules. Use this list instead of routeRules when routing based
     * on simple path matching is all that's required. The order by which path rules
     * are specified does not matter. Matches are always done on the longest-path-first
     * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
     * irrespective of the order in which those paths appear in this list. Within a
     * given pathMatcher, only one of pathRules or routeRules must be set.
     * Structure is documented below.
     * */*/
     */
    @JvmName("qtaepkrcbleykwgx")
    public suspend fun pathRules(argument: suspend RegionUrlMapPathMatcherPathRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegionUrlMapPathMatcherPathRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.pathRules = mapped
    }

    /**
     * @param values The list of path rules. Use this list instead of routeRules when routing based
     * on simple path matching is all that's required. The order by which path rules
     * are specified does not matter. Matches are always done on the longest-path-first
     * basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/*
     * irrespective of the order in which those paths appear in this list. Within a
     * given pathMatcher, only one of pathRules or routeRules must be set.
     * Structure is documented below.
     * */*/
     */
    @JvmName("yqsjacfxesttoowe")
    public suspend fun pathRules(vararg values: RegionUrlMapPathMatcherPathRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pathRules = mapped
    }

    /**
     * @param value The list of ordered HTTP route rules. Use this list instead of pathRules when
     * advanced route matching and routing actions are desired. The order of specifying
     * routeRules matters: the first rule that matches will cause its specified routing
     * action to take effect. Within a given pathMatcher, only one of pathRules or
     * routeRules must be set. routeRules are not supported in UrlMaps intended for
     * External load balancers.
     * Structure is documented below.
     */
    @JvmName("kfgsyijiwepjoemh")
    public suspend fun routeRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routeRules = mapped
    }

    /**
     * @param argument The list of ordered HTTP route rules. Use this list instead of pathRules when
     * advanced route matching and routing actions are desired. The order of specifying
     * routeRules matters: the first rule that matches will cause its specified routing
     * action to take effect. Within a given pathMatcher, only one of pathRules or
     * routeRules must be set. routeRules are not supported in UrlMaps intended for
     * External load balancers.
     * Structure is documented below.
     */
    @JvmName("auneayompsdmdrsi")
    public suspend fun routeRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapPathMatcherRouteRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.routeRules = mapped
    }

    /**
     * @param argument The list of ordered HTTP route rules. Use this list instead of pathRules when
     * advanced route matching and routing actions are desired. The order of specifying
     * routeRules matters: the first rule that matches will cause its specified routing
     * action to take effect. Within a given pathMatcher, only one of pathRules or
     * routeRules must be set. routeRules are not supported in UrlMaps intended for
     * External load balancers.
     * Structure is documented below.
     */
    @JvmName("faopfaumkffmkygr")
    public suspend fun routeRules(vararg argument: suspend RegionUrlMapPathMatcherRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapPathMatcherRouteRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.routeRules = mapped
    }

    /**
     * @param argument The list of ordered HTTP route rules. Use this list instead of pathRules when
     * advanced route matching and routing actions are desired. The order of specifying
     * routeRules matters: the first rule that matches will cause its specified routing
     * action to take effect. Within a given pathMatcher, only one of pathRules or
     * routeRules must be set. routeRules are not supported in UrlMaps intended for
     * External load balancers.
     * Structure is documented below.
     */
    @JvmName("hfvervmtugeylguj")
    public suspend fun routeRules(argument: suspend RegionUrlMapPathMatcherRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegionUrlMapPathMatcherRouteRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.routeRules = mapped
    }

    /**
     * @param values The list of ordered HTTP route rules. Use this list instead of pathRules when
     * advanced route matching and routing actions are desired. The order of specifying
     * routeRules matters: the first rule that matches will cause its specified routing
     * action to take effect. Within a given pathMatcher, only one of pathRules or
     * routeRules must be set. routeRules are not supported in UrlMaps intended for
     * External load balancers.
     * Structure is documented below.
     */
    @JvmName("mvtknkonhavxbcea")
    public suspend fun routeRules(vararg values: RegionUrlMapPathMatcherRouteRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routeRules = mapped
    }

    internal fun build(): RegionUrlMapPathMatcherArgs = RegionUrlMapPathMatcherArgs(
        defaultService = defaultService,
        defaultUrlRedirect = defaultUrlRedirect,
        description = description,
        name = name ?: throw PulumiNullFieldException("name"),
        pathRules = pathRules,
        routeRules = routeRules,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy