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

com.pulumi.gcp.dns.kotlin.inputs.PolicyAlternativeNameServerConfigArgs.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.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.dns.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dns.inputs.PolicyAlternativeNameServerConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property targetNameServers Sets an alternative name server for the associated networks. When specified,
 * all DNS queries are forwarded to a name server that you choose. Names such as .internal
 * are not available when an alternative name server is specified.
 * Structure is documented below.
 */
public data class PolicyAlternativeNameServerConfigArgs(
    public val targetNameServers: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dns.inputs.PolicyAlternativeNameServerConfigArgs =
        com.pulumi.gcp.dns.inputs.PolicyAlternativeNameServerConfigArgs.builder()
            .targetNameServers(
                targetNameServers.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [PolicyAlternativeNameServerConfigArgs].
 */
@PulumiTagMarker
public class PolicyAlternativeNameServerConfigArgsBuilder internal constructor() {
    private var targetNameServers:
        Output>? = null

    /**
     * @param value Sets an alternative name server for the associated networks. When specified,
     * all DNS queries are forwarded to a name server that you choose. Names such as .internal
     * are not available when an alternative name server is specified.
     * Structure is documented below.
     */
    @JvmName("eljdmbgcwndphwok")
    public suspend fun targetNameServers(`value`: Output>) {
        this.targetNameServers = value
    }

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

    /**
     * @param values Sets an alternative name server for the associated networks. When specified,
     * all DNS queries are forwarded to a name server that you choose. Names such as .internal
     * are not available when an alternative name server is specified.
     * Structure is documented below.
     */
    @JvmName("rjrpmkbiiijijvpl")
    public suspend fun targetNameServers(values: List>) {
        this.targetNameServers = Output.all(values)
    }

    /**
     * @param value Sets an alternative name server for the associated networks. When specified,
     * all DNS queries are forwarded to a name server that you choose. Names such as .internal
     * are not available when an alternative name server is specified.
     * Structure is documented below.
     */
    @JvmName("updewrjfbrudlcxi")
    public suspend fun targetNameServers(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetNameServers = mapped
    }

    /**
     * @param argument Sets an alternative name server for the associated networks. When specified,
     * all DNS queries are forwarded to a name server that you choose. Names such as .internal
     * are not available when an alternative name server is specified.
     * Structure is documented below.
     */
    @JvmName("vghhypdxphilpvls")
    public suspend fun targetNameServers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PolicyAlternativeNameServerConfigTargetNameServerArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetNameServers = mapped
    }

    /**
     * @param argument Sets an alternative name server for the associated networks. When specified,
     * all DNS queries are forwarded to a name server that you choose. Names such as .internal
     * are not available when an alternative name server is specified.
     * Structure is documented below.
     */
    @JvmName("pwgwhifkfygtqoda")
    public suspend fun targetNameServers(vararg argument: suspend PolicyAlternativeNameServerConfigTargetNameServerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PolicyAlternativeNameServerConfigTargetNameServerArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetNameServers = mapped
    }

    /**
     * @param argument Sets an alternative name server for the associated networks. When specified,
     * all DNS queries are forwarded to a name server that you choose. Names such as .internal
     * are not available when an alternative name server is specified.
     * Structure is documented below.
     */
    @JvmName("eeqrqfhodpnyhpvs")
    public suspend fun targetNameServers(argument: suspend PolicyAlternativeNameServerConfigTargetNameServerArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                PolicyAlternativeNameServerConfigTargetNameServerArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.targetNameServers = mapped
    }

    /**
     * @param values Sets an alternative name server for the associated networks. When specified,
     * all DNS queries are forwarded to a name server that you choose. Names such as .internal
     * are not available when an alternative name server is specified.
     * Structure is documented below.
     */
    @JvmName("nmfvovcgdpnrwwfk")
    public suspend fun targetNameServers(vararg values: PolicyAlternativeNameServerConfigTargetNameServerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetNameServers = mapped
    }

    internal fun build(): PolicyAlternativeNameServerConfigArgs =
        PolicyAlternativeNameServerConfigArgs(
            targetNameServers = targetNameServers ?: throw PulumiNullFieldException("targetNameServers"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy