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

com.pulumi.gcp.networkservices.kotlin.inputs.EdgeCacheServiceRoutingArgs.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.networkservices.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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 hostRules The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
 * Structure is documented below.
 * @property pathMatchers The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
 * Structure is documented below.
 */
public data class EdgeCacheServiceRoutingArgs(
    public val hostRules: Output>,
    public val pathMatchers: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs =
        com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs.builder()
            .hostRules(
                hostRules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .pathMatchers(
                pathMatchers.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var pathMatchers: Output>? = null

    /**
     * @param value The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
     * Structure is documented below.
     */
    @JvmName("pvjxmirubccbdqvu")
    public suspend fun hostRules(`value`: Output>) {
        this.hostRules = value
    }

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

    /**
     * @param values The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
     * Structure is documented below.
     */
    @JvmName("sfrraqohxfrjptur")
    public suspend fun hostRules(values: List>) {
        this.hostRules = Output.all(values)
    }

    /**
     * @param value The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
     * Structure is documented below.
     */
    @JvmName("jjsddabtbmyaqoli")
    public suspend fun pathMatchers(`value`: Output>) {
        this.pathMatchers = value
    }

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

    /**
     * @param values The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
     * Structure is documented below.
     */
    @JvmName("kqcsexkpiwmgenci")
    public suspend fun pathMatchers(values: List>) {
        this.pathMatchers = Output.all(values)
    }

    /**
     * @param value The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
     * Structure is documented below.
     */
    @JvmName("ypisoaxospefhyva")
    public suspend fun hostRules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hostRules = mapped
    }

    /**
     * @param argument The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
     * Structure is documented below.
     */
    @JvmName("pekixynsndjqwgtu")
    public suspend fun hostRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EdgeCacheServiceRoutingHostRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.hostRules = mapped
    }

    /**
     * @param argument The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
     * Structure is documented below.
     */
    @JvmName("bimuuonfbgfobnkt")
    public suspend fun hostRules(vararg argument: suspend EdgeCacheServiceRoutingHostRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EdgeCacheServiceRoutingHostRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.hostRules = mapped
    }

    /**
     * @param argument The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
     * Structure is documented below.
     */
    @JvmName("vavrlaxxggpfektb")
    public suspend fun hostRules(argument: suspend EdgeCacheServiceRoutingHostRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EdgeCacheServiceRoutingHostRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.hostRules = mapped
    }

    /**
     * @param values The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply.
     * Structure is documented below.
     */
    @JvmName("lmkeaqmhrcljaxnk")
    public suspend fun hostRules(vararg values: EdgeCacheServiceRoutingHostRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hostRules = mapped
    }

    /**
     * @param value The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
     * Structure is documented below.
     */
    @JvmName("vghnkclaggwmuvuh")
    public suspend fun pathMatchers(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pathMatchers = mapped
    }

    /**
     * @param argument The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
     * Structure is documented below.
     */
    @JvmName("xnaoebcwextoriwg")
    public suspend fun pathMatchers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EdgeCacheServiceRoutingPathMatcherArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.pathMatchers = mapped
    }

    /**
     * @param argument The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
     * Structure is documented below.
     */
    @JvmName("ggkdqobsuxhawsww")
    public suspend fun pathMatchers(vararg argument: suspend EdgeCacheServiceRoutingPathMatcherArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EdgeCacheServiceRoutingPathMatcherArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.pathMatchers = mapped
    }

    /**
     * @param argument The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
     * Structure is documented below.
     */
    @JvmName("wqdmhfisorwkxshm")
    public suspend fun pathMatchers(argument: suspend EdgeCacheServiceRoutingPathMatcherArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EdgeCacheServiceRoutingPathMatcherArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.pathMatchers = mapped
    }

    /**
     * @param values The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion.
     * Structure is documented below.
     */
    @JvmName("ispobjbtlyiypchc")
    public suspend fun pathMatchers(vararg values: EdgeCacheServiceRoutingPathMatcherArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pathMatchers = mapped
    }

    internal fun build(): EdgeCacheServiceRoutingArgs = EdgeCacheServiceRoutingArgs(
        hostRules = hostRules ?: throw PulumiNullFieldException("hostRules"),
        pathMatchers = pathMatchers ?: throw PulumiNullFieldException("pathMatchers"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy