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

com.pulumi.gcp.networkservices.kotlin.inputs.EdgeCacheServiceRoutingPathMatcherArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.networkservices.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingPathMatcherArgs.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 description A human-readable description of the resource.
 * @property name The name to which this PathMatcher is referred by the HostRule.
 * @property routeRules The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
 * Structure is documented below.
 */
public data class EdgeCacheServiceRoutingPathMatcherArgs(
    public val description: Output? = null,
    public val name: Output,
    public val routeRules: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingPathMatcherArgs =
        com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingPathMatcherArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .routeRules(
                routeRules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [EdgeCacheServiceRoutingPathMatcherArgs].
 */
@PulumiTagMarker
public class EdgeCacheServiceRoutingPathMatcherArgsBuilder internal constructor() {
    private var description: Output? = null

    private var name: Output? = null

    private var routeRules: Output>? = null

    /**
     * @param value A human-readable description of the resource.
     */
    @JvmName("xwvgtituiqcetkjm")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

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

    /**
     * @param value The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
     * Structure is documented below.
     */
    @JvmName("tqmydvjfrvfeccju")
    public suspend fun routeRules(`value`: Output>) {
        this.routeRules = value
    }

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

    /**
     * @param values The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
     * Structure is documented below.
     */
    @JvmName("oqbddueloshwyqhm")
    public suspend fun routeRules(values: List>) {
        this.routeRules = Output.all(values)
    }

    /**
     * @param value A human-readable description of the resource.
     */
    @JvmName("mxyaejteouinrcif")
    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("cuaeeiqdfttormbt")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
     * Structure is documented below.
     */
    @JvmName("lxgvkiuaspnxiqdd")
    public suspend fun routeRules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routeRules = mapped
    }

    /**
     * @param argument The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
     * Structure is documented below.
     */
    @JvmName("viiqxrcrvgavxdrv")
    public suspend fun routeRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EdgeCacheServiceRoutingPathMatcherRouteRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.routeRules = mapped
    }

    /**
     * @param argument The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
     * Structure is documented below.
     */
    @JvmName("yvyqeenyopnvgxlh")
    public suspend fun routeRules(vararg argument: suspend EdgeCacheServiceRoutingPathMatcherRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EdgeCacheServiceRoutingPathMatcherRouteRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.routeRules = mapped
    }

    /**
     * @param argument The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
     * Structure is documented below.
     */
    @JvmName("ceqctnrytrurjkit")
    public suspend fun routeRules(argument: suspend EdgeCacheServiceRoutingPathMatcherRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EdgeCacheServiceRoutingPathMatcherRouteRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.routeRules = mapped
    }

    /**
     * @param values The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods.
     * Structure is documented below.
     */
    @JvmName("eoxtatkrymvyefco")
    public suspend fun routeRules(vararg values: EdgeCacheServiceRoutingPathMatcherRouteRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routeRules = mapped
    }

    internal fun build(): EdgeCacheServiceRoutingPathMatcherArgs =
        EdgeCacheServiceRoutingPathMatcherArgs(
            description = description,
            name = name ?: throw PulumiNullFieldException("name"),
            routeRules = routeRules ?: throw PulumiNullFieldException("routeRules"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy