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

com.pulumi.gcp.compute.kotlin.inputs.URLMapHostRuleArgs.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.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.URLMapHostRuleArgs.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 resource. 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 URLMapHostRuleArgs(
    public val description: Output? = null,
    public val hosts: Output>,
    public val pathMatcher: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.URLMapHostRuleArgs =
        com.pulumi.gcp.compute.inputs.URLMapHostRuleArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .hosts(hosts.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .pathMatcher(pathMatcher.applyValue({ args0 -> args0 })).build()
}

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

    private var hosts: Output>? = null

    private var pathMatcher: Output? = null

    /**
     * @param value An optional description of this resource. Provide this property when you create
     * the resource.
     */
    @JvmName("nfscuqlqlwpttbko")
    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("shcckftkgifvqunt")
    public suspend fun hosts(`value`: Output>) {
        this.hosts = value
    }

    @JvmName("ciqjvoittouotojn")
    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("dcuaatnqpfkhystt")
    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("ucepofjaopqjbiuu")
    public suspend fun pathMatcher(`value`: Output) {
        this.pathMatcher = value
    }

    /**
     * @param value An optional description of this resource. Provide this property when you create
     * the resource.
     */
    @JvmName("dmhjclukqxpdfkcx")
    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("hfdoxcplpftpdosg")
    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("osvhtcunnbnmltds")
    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("ulfcawdqjohliflb")
    public suspend fun pathMatcher(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pathMatcher = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy