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

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

import com.pulumi.cloudflare.inputs.AccessApplicationTargetCriteriaArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property port The port that the targets use for the chosen communication protocol. A port cannot be assigned to multiple protocols.
 * @property protocol The communication protocol your application secures.
 * @property targetAttributes Contains a map of target attribute keys to target attribute values.
 */
public data class AccessApplicationTargetCriteriaArgs(
    public val port: Output,
    public val protocol: Output,
    public val targetAttributes: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.AccessApplicationTargetCriteriaArgs =
        com.pulumi.cloudflare.inputs.AccessApplicationTargetCriteriaArgs.builder()
            .port(port.applyValue({ args0 -> args0 }))
            .protocol(protocol.applyValue({ args0 -> args0 }))
            .targetAttributes(
                targetAttributes.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AccessApplicationTargetCriteriaArgs].
 */
@PulumiTagMarker
public class AccessApplicationTargetCriteriaArgsBuilder internal constructor() {
    private var port: Output? = null

    private var protocol: Output? = null

    private var targetAttributes: Output>? =
        null

    /**
     * @param value The port that the targets use for the chosen communication protocol. A port cannot be assigned to multiple protocols.
     */
    @JvmName("ivfdyrrivvrkyefw")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value The communication protocol your application secures.
     */
    @JvmName("vhfufdhagjhmylii")
    public suspend fun protocol(`value`: Output) {
        this.protocol = value
    }

    /**
     * @param value Contains a map of target attribute keys to target attribute values.
     */
    @JvmName("rqvhlpxiftixnvbm")
    public suspend fun targetAttributes(`value`: Output>) {
        this.targetAttributes = value
    }

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

    /**
     * @param values Contains a map of target attribute keys to target attribute values.
     */
    @JvmName("oblggnaprirclgiv")
    public suspend fun targetAttributes(values: List>) {
        this.targetAttributes = Output.all(values)
    }

    /**
     * @param value The port that the targets use for the chosen communication protocol. A port cannot be assigned to multiple protocols.
     */
    @JvmName("shbsqswdgshamjtd")
    public suspend fun port(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value The communication protocol your application secures.
     */
    @JvmName("bfglfehoheoshsre")
    public suspend fun protocol(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value Contains a map of target attribute keys to target attribute values.
     */
    @JvmName("bchhdavmojwlucpj")
    public suspend fun targetAttributes(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetAttributes = mapped
    }

    /**
     * @param argument Contains a map of target attribute keys to target attribute values.
     */
    @JvmName("lbsfkshcwlygjlkk")
    public suspend fun targetAttributes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccessApplicationTargetCriteriaTargetAttributeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetAttributes = mapped
    }

    /**
     * @param argument Contains a map of target attribute keys to target attribute values.
     */
    @JvmName("pttwaukfxynyorly")
    public suspend fun targetAttributes(vararg argument: suspend AccessApplicationTargetCriteriaTargetAttributeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessApplicationTargetCriteriaTargetAttributeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetAttributes = mapped
    }

    /**
     * @param argument Contains a map of target attribute keys to target attribute values.
     */
    @JvmName("jstscrwuuulkdlew")
    public suspend fun targetAttributes(argument: suspend AccessApplicationTargetCriteriaTargetAttributeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccessApplicationTargetCriteriaTargetAttributeArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.targetAttributes = mapped
    }

    /**
     * @param values Contains a map of target attribute keys to target attribute values.
     */
    @JvmName("bhyyjsruntvpdvea")
    public suspend fun targetAttributes(vararg values: AccessApplicationTargetCriteriaTargetAttributeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetAttributes = mapped
    }

    internal fun build(): AccessApplicationTargetCriteriaArgs = AccessApplicationTargetCriteriaArgs(
        port = port ?: throw PulumiNullFieldException("port"),
        protocol = protocol ?: throw PulumiNullFieldException("protocol"),
        targetAttributes = targetAttributes ?: throw PulumiNullFieldException("targetAttributes"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy