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

com.pulumi.googlenative.networkservices.v1beta1.kotlin.TcpRouteArgs.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.v1beta1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.networkservices.v1beta1.TcpRouteArgs.builder
import com.pulumi.googlenative.networkservices.v1beta1.kotlin.inputs.TcpRouteRouteRuleArgs
import com.pulumi.googlenative.networkservices.v1beta1.kotlin.inputs.TcpRouteRouteRuleArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a new TcpRoute 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 TcpRoute 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 labels Optional. Set of label tags associated with the TcpRoute resource.
 * @property location
 * @property meshes Optional. Meshes defines a list of meshes this TcpRoute 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 TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_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 tcpRouteId Required. Short name of the TcpRoute resource to be created. E.g. TODO(Add an example).
 * */*/*/
 */
public data class TcpRouteArgs(
    public val description: Output? = null,
    public val gateways: Output>? = null,
    public val labels: 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 tcpRouteId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.networkservices.v1beta1.TcpRouteArgs =
        com.pulumi.googlenative.networkservices.v1beta1.TcpRouteArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .gateways(gateways?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .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() }) }) }))
            .tcpRouteId(tcpRouteId?.applyValue({ args0 -> args0 })).build()
}

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

    private var gateways: Output>? = null

    private var labels: 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 tcpRouteId: Output? = null

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

    /**
     * @param value Optional. Gateways defines a list of gateways this TcpRoute 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("glcckdxvgqrdklgb")
    public suspend fun gateways(`value`: Output>) {
        this.gateways = value
    }

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

    /**
     * @param values Optional. Gateways defines a list of gateways this TcpRoute 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("jhtaeibjmjtxiovw")
    public suspend fun gateways(values: List>) {
        this.gateways = Output.all(values)
    }

    /**
     * @param value Optional. Set of label tags associated with the TcpRoute resource.
     */
    @JvmName("fqwccmrhlxvvrfrf")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

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

    /**
     * @param value Optional. Meshes defines a list of meshes this TcpRoute 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("xntpgcspnuuxprem")
    public suspend fun meshes(`value`: Output>) {
        this.meshes = value
    }

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

    /**
     * @param values Optional. Meshes defines a list of meshes this TcpRoute 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("xbnvcbkhqubjibim")
    public suspend fun meshes(values: List>) {
        this.meshes = Output.all(values)
    }

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

    /**
     * @param value
     */
    @JvmName("arqesoxmvynvmgfe")
    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("vatksmjmvacdgpac")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

    @JvmName("jtbvlwhrfaiqbllm")
    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("yiyhuhtfppbarslt")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

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

    /**
     * @param value Optional. A free-text description of the resource. Max length 1024 characters.
     */
    @JvmName("tnrmwgcskqfyumiv")
    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 TcpRoute 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("yqslsnlqlmgyrljm")
    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 TcpRoute 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("hyxqwkbafgcvlxfn")
    public suspend fun gateways(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.gateways = mapped
    }

    /**
     * @param value Optional. Set of label tags associated with the TcpRoute resource.
     */
    @JvmName("kxaqbhlgtjudbmtb")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Optional. Set of label tags associated with the TcpRoute resource.
     */
    @JvmName("khohwtvlokprmijr")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value
     */
    @JvmName("euwulvclwwuholjt")
    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 TcpRoute 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("emngugtyrudjbqdg")
    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 TcpRoute 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("qewyahqywqoyuenk")
    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 TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
     * */
     */
    @JvmName("xbenmpapflfhrxvv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("ppqcwbiyuclvnjgw")
    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("inkedaahsgsauset")
    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("gvbgvuymrqmxhjfj")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TcpRouteRouteRuleArgsBuilder().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("uwfyfbbcqhcvvocc")
    public suspend fun rules(vararg argument: suspend TcpRouteRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TcpRouteRouteRuleArgsBuilder().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("dmijnbedpsdtuaxj")
    public suspend fun rules(argument: suspend TcpRouteRouteRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TcpRouteRouteRuleArgsBuilder().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("wfmrpkntynrqvbrj")
    public suspend fun rules(vararg values: TcpRouteRouteRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

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

    internal fun build(): TcpRouteArgs = TcpRouteArgs(
        description = description,
        gateways = gateways,
        labels = labels,
        location = location,
        meshes = meshes,
        name = name,
        project = project,
        rules = rules,
        tcpRouteId = tcpRouteId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy