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

com.pulumi.googlenative.networkservices.v1.kotlin.TlsRouteArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.networkservices.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.networkservices.v1.TlsRouteArgs.builder
import com.pulumi.googlenative.networkservices.v1.kotlin.inputs.TlsRouteRouteRuleArgs
import com.pulumi.googlenative.networkservices.v1.kotlin.inputs.TlsRouteRouteRuleArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
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

/**
 * Creates a new TlsRoute in a given project and location.
 * @property description Optional. A free-text description of the resource. Max length 1024 characters.
 * @property gateways Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
 * @property location
 * @property meshes Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
 * @property name Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name>`.
 * @property project
 * @property rules Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
 * @property tlsRouteId Required. Short name of the TlsRoute resource to be created. E.g. TODO(Add an example).
 * */*/*/
 */
public data class TlsRouteArgs(
    public val description: Output? = null,
    public val gateways: Output>? = null,
    public val location: Output? = null,
    public val meshes: Output>? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val rules: Output>? = null,
    public val tlsRouteId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.networkservices.v1.TlsRouteArgs =
        com.pulumi.googlenative.networkservices.v1.TlsRouteArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .gateways(gateways?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .meshes(meshes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .rules(rules?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .tlsRouteId(tlsRouteId?.applyValue({ args0 -> args0 })).build()
}

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

    private var gateways: Output>? = null

    private var location: Output? = null

    private var meshes: Output>? = null

    private var name: Output? = null

    private var project: Output? = null

    private var rules: Output>? = null

    private var tlsRouteId: Output? = null

    /**
     * @param value Optional. A free-text description of the resource. Max length 1024 characters.
     */
    @JvmName("fkhjurdlklsxmtnb")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
     * */
     */
    @JvmName("apyneqrankolmlms")
    public suspend fun gateways(`value`: Output>) {
        this.gateways = value
    }

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

    /**
     * @param values Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
     * */
     */
    @JvmName("onkojvwyfgmsmqep")
    public suspend fun gateways(values: List>) {
        this.gateways = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("kgntoufbgcfhtnhg")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
     * */
     */
    @JvmName("hyknqqhgualuhvih")
    public suspend fun meshes(`value`: Output>) {
        this.meshes = value
    }

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

    /**
     * @param values Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
     * */
     */
    @JvmName("fwsguxnyyfefxcjq")
    public suspend fun meshes(values: List>) {
        this.meshes = Output.all(values)
    }

    /**
     * @param value Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name>`.
     * */
     */
    @JvmName("ishgtgnvennabvft")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("kxlwwwfiojycgncj")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     */
    @JvmName("rxxrysduphlodibh")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     */
    @JvmName("lrbefkhotexmngdg")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value Required. Short name of the TlsRoute resource to be created. E.g. TODO(Add an example).
     */
    @JvmName("upwatbtheqinqknv")
    public suspend fun tlsRouteId(`value`: Output) {
        this.tlsRouteId = value
    }

    /**
     * @param value Optional. A free-text description of the resource. Max length 1024 characters.
     */
    @JvmName("htofmxgbbqrhrgdk")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
     * */
     */
    @JvmName("pjkukyqneojrycea")
    public suspend fun gateways(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gateways = mapped
    }

    /**
     * @param values Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
     * */
     */
    @JvmName("skdkaradxaurlmwu")
    public suspend fun gateways(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.gateways = mapped
    }

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

    /**
     * @param value Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
     * */
     */
    @JvmName("urxpoxnxenvqmwvh")
    public suspend fun meshes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.meshes = mapped
    }

    /**
     * @param values Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
     * */
     */
    @JvmName("oaqpglqasxgybura")
    public suspend fun meshes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.meshes = mapped
    }

    /**
     * @param value Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name>`.
     * */
     */
    @JvmName("cmxbdvotamvlkqec")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

    /**
     * @param value Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     */
    @JvmName("efxioyojqbtfoixd")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     */
    @JvmName("fxbyttducrxcfgnk")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TlsRouteRouteRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     */
    @JvmName("aoqwjkfyxhgbylos")
    public suspend fun rules(vararg argument: suspend TlsRouteRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TlsRouteRouteRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     */
    @JvmName("frpvgpqidtttjjvh")
    public suspend fun rules(argument: suspend TlsRouteRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TlsRouteRouteRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     */
    @JvmName("thrdbvpdrpkplcda")
    public suspend fun rules(vararg values: TlsRouteRouteRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param value Required. Short name of the TlsRoute resource to be created. E.g. TODO(Add an example).
     */
    @JvmName("bekrvuvmbxidoprg")
    public suspend fun tlsRouteId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsRouteId = mapped
    }

    internal fun build(): TlsRouteArgs = TlsRouteArgs(
        description = description,
        gateways = gateways,
        location = location,
        meshes = meshes,
        name = name,
        project = project,
        rules = rules,
        tlsRouteId = tlsRouteId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy