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

com.pulumi.gcp.integrationconnectors.kotlin.inputs.ConnectionDestinationConfigArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.integrationconnectors.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.integrationconnectors.inputs.ConnectionDestinationConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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

/**
 *
 * @property destinations The destinations for the key.
 * Structure is documented below.
 * @property key The key is the destination identifier that is supported by the Connector.
 */
public data class ConnectionDestinationConfigArgs(
    public val destinations: Output>? = null,
    public val key: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.integrationconnectors.inputs.ConnectionDestinationConfigArgs = com.pulumi.gcp.integrationconnectors.inputs.ConnectionDestinationConfigArgs.builder()
        .destinations(
            destinations?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .key(key.applyValue({ args0 -> args0 })).build()
}

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

    private var key: Output? = null

    /**
     * @param value The destinations for the key.
     * Structure is documented below.
     */
    @JvmName("gixmbrignoifwtbb")
    public suspend fun destinations(`value`: Output>) {
        this.destinations = value
    }

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

    /**
     * @param values The destinations for the key.
     * Structure is documented below.
     */
    @JvmName("gklijokepixcybgy")
    public suspend fun destinations(values: List>) {
        this.destinations = Output.all(values)
    }

    /**
     * @param value The key is the destination identifier that is supported by the Connector.
     */
    @JvmName("pkcnwtsemsyirkto")
    public suspend fun key(`value`: Output) {
        this.key = value
    }

    /**
     * @param value The destinations for the key.
     * Structure is documented below.
     */
    @JvmName("jxpnccpuyoomufgb")
    public suspend fun destinations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param argument The destinations for the key.
     * Structure is documented below.
     */
    @JvmName("dhjmnuwgbtrwnlxn")
    public suspend fun destinations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ConnectionDestinationConfigDestinationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param argument The destinations for the key.
     * Structure is documented below.
     */
    @JvmName("rawpuiddlvnimmxg")
    public suspend fun destinations(vararg argument: suspend ConnectionDestinationConfigDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ConnectionDestinationConfigDestinationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param argument The destinations for the key.
     * Structure is documented below.
     */
    @JvmName("wxkpsaehivmefrbh")
    public suspend fun destinations(argument: suspend ConnectionDestinationConfigDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ConnectionDestinationConfigDestinationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param values The destinations for the key.
     * Structure is documented below.
     */
    @JvmName("cvhsnnxpurtcioax")
    public suspend fun destinations(vararg values: ConnectionDestinationConfigDestinationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param value The key is the destination identifier that is supported by the Connector.
     */
    @JvmName("eiyvuqpghlmhluvd")
    public suspend fun key(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.key = mapped
    }

    internal fun build(): ConnectionDestinationConfigArgs = ConnectionDestinationConfigArgs(
        destinations = destinations,
        key = key ?: throw PulumiNullFieldException("key"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy