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

com.pulumi.cloudflare.kotlin.SplitTunnelArgs.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.cloudflare.kotlin

import com.pulumi.cloudflare.SplitTunnelArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.SplitTunnelTunnelArgs
import com.pulumi.cloudflare.kotlin.inputs.SplitTunnelTunnelArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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

/**
 * Provides a Cloudflare Split Tunnel resource. Split tunnels are used to either
 * include or exclude lists of routes from the WARP client's tunnel.
 * ## Import
 * Split Tunnels for default device policies must use "default" as the policy ID.
 * ```sh
 * $ pulumi import cloudflare:index/splitTunnel:SplitTunnel example //
 * ```
 * @property accountId The account identifier to target for the resource.
 * @property mode The mode of the split tunnel policy. Available values: `include`, `exclude`.
 * @property policyId The settings policy for which to configure this split tunnel policy.
 * @property tunnels The value of the tunnel attributes.
 */
public data class SplitTunnelArgs(
    public val accountId: Output? = null,
    public val mode: Output? = null,
    public val policyId: Output? = null,
    public val tunnels: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.SplitTunnelArgs =
        com.pulumi.cloudflare.SplitTunnelArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .policyId(policyId?.applyValue({ args0 -> args0 }))
            .tunnels(
                tunnels?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [SplitTunnelArgs].
 */
@PulumiTagMarker
public class SplitTunnelArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var mode: Output? = null

    private var policyId: Output? = null

    private var tunnels: Output>? = null

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("bfutlwitfdqgvqrp")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value The mode of the split tunnel policy. Available values: `include`, `exclude`.
     */
    @JvmName("secduigollkdjsqa")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value The settings policy for which to configure this split tunnel policy.
     */
    @JvmName("fleondnlsschrxrm")
    public suspend fun policyId(`value`: Output) {
        this.policyId = value
    }

    /**
     * @param value The value of the tunnel attributes.
     */
    @JvmName("ttalnanhuuinoeqk")
    public suspend fun tunnels(`value`: Output>) {
        this.tunnels = value
    }

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

    /**
     * @param values The value of the tunnel attributes.
     */
    @JvmName("hmxstxagyqlqudvp")
    public suspend fun tunnels(values: List>) {
        this.tunnels = Output.all(values)
    }

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("jeitwwclsneebnkq")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value The mode of the split tunnel policy. Available values: `include`, `exclude`.
     */
    @JvmName("doyvpxvbsptyypvv")
    public suspend fun mode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The settings policy for which to configure this split tunnel policy.
     */
    @JvmName("aygxbcgidkfymuxm")
    public suspend fun policyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyId = mapped
    }

    /**
     * @param value The value of the tunnel attributes.
     */
    @JvmName("dfrjfxtkykcoknog")
    public suspend fun tunnels(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tunnels = mapped
    }

    /**
     * @param argument The value of the tunnel attributes.
     */
    @JvmName("urordrkusewxxfwt")
    public suspend fun tunnels(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SplitTunnelTunnelArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tunnels = mapped
    }

    /**
     * @param argument The value of the tunnel attributes.
     */
    @JvmName("hofxrrwcubatavpm")
    public suspend fun tunnels(vararg argument: suspend SplitTunnelTunnelArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SplitTunnelTunnelArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tunnels = mapped
    }

    /**
     * @param argument The value of the tunnel attributes.
     */
    @JvmName("ugigarqpemblnmnw")
    public suspend fun tunnels(argument: suspend SplitTunnelTunnelArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SplitTunnelTunnelArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tunnels = mapped
    }

    /**
     * @param values The value of the tunnel attributes.
     */
    @JvmName("chhjqxhpmqwljxvy")
    public suspend fun tunnels(vararg values: SplitTunnelTunnelArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tunnels = mapped
    }

    internal fun build(): SplitTunnelArgs = SplitTunnelArgs(
        accountId = accountId,
        mode = mode,
        policyId = policyId,
        tunnels = tunnels,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy