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

com.pulumi.googlenative.dns.v1beta2.kotlin.ResponsePolicyArgs.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.dns.v1beta2.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.dns.v1beta2.ResponsePolicyArgs.builder
import com.pulumi.googlenative.dns.v1beta2.kotlin.inputs.ResponsePolicyGKEClusterArgs
import com.pulumi.googlenative.dns.v1beta2.kotlin.inputs.ResponsePolicyGKEClusterArgsBuilder
import com.pulumi.googlenative.dns.v1beta2.kotlin.inputs.ResponsePolicyNetworkArgs
import com.pulumi.googlenative.dns.v1beta2.kotlin.inputs.ResponsePolicyNetworkArgsBuilder
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 Response Policy
 * Auto-naming is currently not supported for this resource.
 * @property clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
 * @property description User-provided description for this Response Policy.
 * @property gkeClusters The list of Google Kubernetes Engine clusters to which this response policy is applied.
 * @property kind
 * @property labels User labels.
 * @property networks List of network names specifying networks to which this policy is applied.
 * @property project
 * @property responsePolicyName User assigned name for this Response Policy.
 */
public data class ResponsePolicyArgs(
    public val clientOperationId: Output? = null,
    public val description: Output? = null,
    public val gkeClusters: Output>? = null,
    public val kind: Output? = null,
    public val labels: Output>? = null,
    public val networks: Output>? = null,
    public val project: Output? = null,
    public val responsePolicyName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.dns.v1beta2.ResponsePolicyArgs =
        com.pulumi.googlenative.dns.v1beta2.ResponsePolicyArgs.builder()
            .clientOperationId(clientOperationId?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .gkeClusters(
                gkeClusters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .kind(kind?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .networks(
                networks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .project(project?.applyValue({ args0 -> args0 }))
            .responsePolicyName(responsePolicyName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ResponsePolicyArgs].
 */
@PulumiTagMarker
public class ResponsePolicyArgsBuilder internal constructor() {
    private var clientOperationId: Output? = null

    private var description: Output? = null

    private var gkeClusters: Output>? = null

    private var kind: Output? = null

    private var labels: Output>? = null

    private var networks: Output>? = null

    private var project: Output? = null

    private var responsePolicyName: Output? = null

    /**
     * @param value For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
     */
    @JvmName("lqujuimvkrfdemto")
    public suspend fun clientOperationId(`value`: Output) {
        this.clientOperationId = value
    }

    /**
     * @param value User-provided description for this Response Policy.
     */
    @JvmName("nmrbajycjhsiyfot")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The list of Google Kubernetes Engine clusters to which this response policy is applied.
     */
    @JvmName("awoclkskevcugdxo")
    public suspend fun gkeClusters(`value`: Output>) {
        this.gkeClusters = value
    }

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

    /**
     * @param values The list of Google Kubernetes Engine clusters to which this response policy is applied.
     */
    @JvmName("jjurkltqxnnlhwdw")
    public suspend fun gkeClusters(values: List>) {
        this.gkeClusters = Output.all(values)
    }

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

    /**
     * @param value User labels.
     */
    @JvmName("jslxpkofftrfrsuo")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value List of network names specifying networks to which this policy is applied.
     */
    @JvmName("tqfxfrhukghunofj")
    public suspend fun networks(`value`: Output>) {
        this.networks = value
    }

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

    /**
     * @param values List of network names specifying networks to which this policy is applied.
     */
    @JvmName("ippqubaajsjbcjvb")
    public suspend fun networks(values: List>) {
        this.networks = Output.all(values)
    }

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

    /**
     * @param value User assigned name for this Response Policy.
     */
    @JvmName("xrthjmtkreoynojt")
    public suspend fun responsePolicyName(`value`: Output) {
        this.responsePolicyName = value
    }

    /**
     * @param value For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
     */
    @JvmName("vnhsxodpooiwvrgg")
    public suspend fun clientOperationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientOperationId = mapped
    }

    /**
     * @param value User-provided description for this Response Policy.
     */
    @JvmName("pljpmvfjyoyynola")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The list of Google Kubernetes Engine clusters to which this response policy is applied.
     */
    @JvmName("bqbutyrlyhjgndtl")
    public suspend fun gkeClusters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gkeClusters = mapped
    }

    /**
     * @param argument The list of Google Kubernetes Engine clusters to which this response policy is applied.
     */
    @JvmName("vxvexrckdthybrcf")
    public suspend fun gkeClusters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResponsePolicyGKEClusterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.gkeClusters = mapped
    }

    /**
     * @param argument The list of Google Kubernetes Engine clusters to which this response policy is applied.
     */
    @JvmName("hegqjlqirnngaxoq")
    public suspend fun gkeClusters(vararg argument: suspend ResponsePolicyGKEClusterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResponsePolicyGKEClusterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.gkeClusters = mapped
    }

    /**
     * @param argument The list of Google Kubernetes Engine clusters to which this response policy is applied.
     */
    @JvmName("cndakbbbtpiwdyai")
    public suspend fun gkeClusters(argument: suspend ResponsePolicyGKEClusterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ResponsePolicyGKEClusterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.gkeClusters = mapped
    }

    /**
     * @param values The list of Google Kubernetes Engine clusters to which this response policy is applied.
     */
    @JvmName("glawfjgmlghepnta")
    public suspend fun gkeClusters(vararg values: ResponsePolicyGKEClusterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.gkeClusters = mapped
    }

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

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

    /**
     * @param values User labels.
     */
    @JvmName("uccerfnjlxkjtoyh")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value List of network names specifying networks to which this policy is applied.
     */
    @JvmName("irvqibjvlnwjdoqb")
    public suspend fun networks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networks = mapped
    }

    /**
     * @param argument List of network names specifying networks to which this policy is applied.
     */
    @JvmName("ppavtcgqxnweqarc")
    public suspend fun networks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResponsePolicyNetworkArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networks = mapped
    }

    /**
     * @param argument List of network names specifying networks to which this policy is applied.
     */
    @JvmName("nhwysspytntejwxt")
    public suspend fun networks(vararg argument: suspend ResponsePolicyNetworkArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResponsePolicyNetworkArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networks = mapped
    }

    /**
     * @param argument List of network names specifying networks to which this policy is applied.
     */
    @JvmName("ysivylretsxnfaxh")
    public suspend fun networks(argument: suspend ResponsePolicyNetworkArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ResponsePolicyNetworkArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.networks = mapped
    }

    /**
     * @param values List of network names specifying networks to which this policy is applied.
     */
    @JvmName("rakfifrnjmtrktnm")
    public suspend fun networks(vararg values: ResponsePolicyNetworkArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networks = mapped
    }

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

    /**
     * @param value User assigned name for this Response Policy.
     */
    @JvmName("tniodncwodfcbogq")
    public suspend fun responsePolicyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responsePolicyName = mapped
    }

    internal fun build(): ResponsePolicyArgs = ResponsePolicyArgs(
        clientOperationId = clientOperationId,
        description = description,
        gkeClusters = gkeClusters,
        kind = kind,
        labels = labels,
        networks = networks,
        project = project,
        responsePolicyName = responsePolicyName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy