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

com.pulumi.gcp.compute.kotlin.inputs.RegionUrlMapHostRuleArgs.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.RegionUrlMapHostRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property description An optional description of this HostRule. Provide this property
 * when you create the resource.
 * @property hosts The list of host patterns to match. They must be valid
 * hostnames, except * will match any string of ([a-z0-9-.]*). In
 * that case, * must be the first character and must be followed in
 * the pattern by either - or ..
 * @property pathMatcher The name of the PathMatcher to use to match the path portion of
 * the URL if the hostRule matches the URL's host portion.
 */
public data class RegionUrlMapHostRuleArgs(
    public val description: Output? = null,
    public val hosts: Output>,
    public val pathMatcher: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.RegionUrlMapHostRuleArgs =
        com.pulumi.gcp.compute.inputs.RegionUrlMapHostRuleArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .hosts(hosts.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .pathMatcher(pathMatcher.applyValue({ args0 -> args0 })).build()
}

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

    private var hosts: Output>? = null

    private var pathMatcher: Output? = null

    /**
     * @param value An optional description of this HostRule. Provide this property
     * when you create the resource.
     */
    @JvmName("byroqqdnxeysfogm")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The list of host patterns to match. They must be valid
     * hostnames, except * will match any string of ([a-z0-9-.]*). In
     * that case, * must be the first character and must be followed in
     * the pattern by either - or ..
     */
    @JvmName("uahiyecpyonqhacv")
    public suspend fun hosts(`value`: Output>) {
        this.hosts = value
    }

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

    /**
     * @param values The list of host patterns to match. They must be valid
     * hostnames, except * will match any string of ([a-z0-9-.]*). In
     * that case, * must be the first character and must be followed in
     * the pattern by either - or ..
     */
    @JvmName("yysaaphfhghpjtsw")
    public suspend fun hosts(values: List>) {
        this.hosts = Output.all(values)
    }

    /**
     * @param value The name of the PathMatcher to use to match the path portion of
     * the URL if the hostRule matches the URL's host portion.
     */
    @JvmName("eknviktbmillwfan")
    public suspend fun pathMatcher(`value`: Output) {
        this.pathMatcher = value
    }

    /**
     * @param value An optional description of this HostRule. Provide this property
     * when you create the resource.
     */
    @JvmName("faugqgenvmfiujhy")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The list of host patterns to match. They must be valid
     * hostnames, except * will match any string of ([a-z0-9-.]*). In
     * that case, * must be the first character and must be followed in
     * the pattern by either - or ..
     */
    @JvmName("eafyvunntfpgdsdr")
    public suspend fun hosts(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hosts = mapped
    }

    /**
     * @param values The list of host patterns to match. They must be valid
     * hostnames, except * will match any string of ([a-z0-9-.]*). In
     * that case, * must be the first character and must be followed in
     * the pattern by either - or ..
     */
    @JvmName("tahgymvhrsqfurhk")
    public suspend fun hosts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hosts = mapped
    }

    /**
     * @param value The name of the PathMatcher to use to match the path portion of
     * the URL if the hostRule matches the URL's host portion.
     */
    @JvmName("ntjcdoabhqiairom")
    public suspend fun pathMatcher(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pathMatcher = mapped
    }

    internal fun build(): RegionUrlMapHostRuleArgs = RegionUrlMapHostRuleArgs(
        description = description,
        hosts = hosts ?: throw PulumiNullFieldException("hosts"),
        pathMatcher = pathMatcher ?: throw PulumiNullFieldException("pathMatcher"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy