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

com.pulumi.gcp.integrationconnectors.kotlin.inputs.ConnectionAuthConfigArgs.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.ConnectionAuthConfigArgs.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 additionalVariables List containing additional auth configs.
 * Structure is documented below.
 * @property authKey The type of authentication configured.
 * @property authType authType of the Connection
 * Possible values are: `USER_PASSWORD`.
 * @property oauth2AuthCodeFlow Parameters to support Oauth 2.0 Auth Code Grant Authentication.
 * Structure is documented below.
 * @property oauth2ClientCredentials OAuth3 Client Credentials for Authentication.
 * Structure is documented below.
 * @property oauth2JwtBearer OAuth2 JWT Bearer for Authentication.
 * Structure is documented below.
 * @property sshPublicKey SSH Public Key for Authentication.
 * Structure is documented below.
 * @property userPassword User password for Authentication.
 * Structure is documented below.
 */
public data class ConnectionAuthConfigArgs(
    public val additionalVariables: Output>? = null,
    public val authKey: Output? = null,
    public val authType: Output,
    public val oauth2AuthCodeFlow: Output? = null,
    public val oauth2ClientCredentials: Output? =
        null,
    public val oauth2JwtBearer: Output? = null,
    public val sshPublicKey: Output? = null,
    public val userPassword: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.integrationconnectors.inputs.ConnectionAuthConfigArgs =
        com.pulumi.gcp.integrationconnectors.inputs.ConnectionAuthConfigArgs.builder()
            .additionalVariables(
                additionalVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .authKey(authKey?.applyValue({ args0 -> args0 }))
            .authType(authType.applyValue({ args0 -> args0 }))
            .oauth2AuthCodeFlow(
                oauth2AuthCodeFlow?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .oauth2ClientCredentials(
                oauth2ClientCredentials?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .oauth2JwtBearer(oauth2JwtBearer?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sshPublicKey(sshPublicKey?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .userPassword(userPassword?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var authKey: Output? = null

    private var authType: Output? = null

    private var oauth2AuthCodeFlow: Output? = null

    private var oauth2ClientCredentials: Output? =
        null

    private var oauth2JwtBearer: Output? = null

    private var sshPublicKey: Output? = null

    private var userPassword: Output? = null

    /**
     * @param value List containing additional auth configs.
     * Structure is documented below.
     */
    @JvmName("aslicjyrgdotmffn")
    public suspend fun additionalVariables(`value`: Output>) {
        this.additionalVariables = value
    }

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

    /**
     * @param values List containing additional auth configs.
     * Structure is documented below.
     */
    @JvmName("svrgtnqtuhmoufqg")
    public suspend fun additionalVariables(values: List>) {
        this.additionalVariables = Output.all(values)
    }

    /**
     * @param value The type of authentication configured.
     */
    @JvmName("iujkbglygwiiclaw")
    public suspend fun authKey(`value`: Output) {
        this.authKey = value
    }

    /**
     * @param value authType of the Connection
     * Possible values are: `USER_PASSWORD`.
     */
    @JvmName("mfhqxcybqffgmuwh")
    public suspend fun authType(`value`: Output) {
        this.authType = value
    }

    /**
     * @param value Parameters to support Oauth 2.0 Auth Code Grant Authentication.
     * Structure is documented below.
     */
    @JvmName("bsuxkbqdjthbygas")
    public suspend fun oauth2AuthCodeFlow(`value`: Output) {
        this.oauth2AuthCodeFlow = value
    }

    /**
     * @param value OAuth3 Client Credentials for Authentication.
     * Structure is documented below.
     */
    @JvmName("xpqgwfdqrrinfiku")
    public suspend fun oauth2ClientCredentials(`value`: Output) {
        this.oauth2ClientCredentials = value
    }

    /**
     * @param value OAuth2 JWT Bearer for Authentication.
     * Structure is documented below.
     */
    @JvmName("xmjonmeduiquscol")
    public suspend fun oauth2JwtBearer(`value`: Output) {
        this.oauth2JwtBearer = value
    }

    /**
     * @param value SSH Public Key for Authentication.
     * Structure is documented below.
     */
    @JvmName("bqswbmviwvtapvhq")
    public suspend fun sshPublicKey(`value`: Output) {
        this.sshPublicKey = value
    }

    /**
     * @param value User password for Authentication.
     * Structure is documented below.
     */
    @JvmName("xbeqhgnypdtdudaj")
    public suspend fun userPassword(`value`: Output) {
        this.userPassword = value
    }

    /**
     * @param value List containing additional auth configs.
     * Structure is documented below.
     */
    @JvmName("gjgqbfsownttwiix")
    public suspend fun additionalVariables(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalVariables = mapped
    }

    /**
     * @param argument List containing additional auth configs.
     * Structure is documented below.
     */
    @JvmName("qwtfinnyqfystptp")
    public suspend fun additionalVariables(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ConnectionAuthConfigAdditionalVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalVariables = mapped
    }

    /**
     * @param argument List containing additional auth configs.
     * Structure is documented below.
     */
    @JvmName("hxojopgetqgcfhrs")
    public suspend fun additionalVariables(vararg argument: suspend ConnectionAuthConfigAdditionalVariableArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ConnectionAuthConfigAdditionalVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalVariables = mapped
    }

    /**
     * @param argument List containing additional auth configs.
     * Structure is documented below.
     */
    @JvmName("wjeuqpevbqxulxdk")
    public suspend fun additionalVariables(argument: suspend ConnectionAuthConfigAdditionalVariableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ConnectionAuthConfigAdditionalVariableArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.additionalVariables = mapped
    }

    /**
     * @param values List containing additional auth configs.
     * Structure is documented below.
     */
    @JvmName("nshpddtlgaocyqne")
    public suspend fun additionalVariables(vararg values: ConnectionAuthConfigAdditionalVariableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalVariables = mapped
    }

    /**
     * @param value The type of authentication configured.
     */
    @JvmName("xwxkjvqldggpphej")
    public suspend fun authKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authKey = mapped
    }

    /**
     * @param value authType of the Connection
     * Possible values are: `USER_PASSWORD`.
     */
    @JvmName("yvhvrwdxrrdagdyq")
    public suspend fun authType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authType = mapped
    }

    /**
     * @param value Parameters to support Oauth 2.0 Auth Code Grant Authentication.
     * Structure is documented below.
     */
    @JvmName("fmpymyxjlqhofhtc")
    public suspend fun oauth2AuthCodeFlow(`value`: ConnectionAuthConfigOauth2AuthCodeFlowArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oauth2AuthCodeFlow = mapped
    }

    /**
     * @param argument Parameters to support Oauth 2.0 Auth Code Grant Authentication.
     * Structure is documented below.
     */
    @JvmName("mgrpbxtqrtdoocya")
    public suspend fun oauth2AuthCodeFlow(argument: suspend ConnectionAuthConfigOauth2AuthCodeFlowArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionAuthConfigOauth2AuthCodeFlowArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.oauth2AuthCodeFlow = mapped
    }

    /**
     * @param value OAuth3 Client Credentials for Authentication.
     * Structure is documented below.
     */
    @JvmName("rbdxslbofccioabi")
    public suspend fun oauth2ClientCredentials(`value`: ConnectionAuthConfigOauth2ClientCredentialsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oauth2ClientCredentials = mapped
    }

    /**
     * @param argument OAuth3 Client Credentials for Authentication.
     * Structure is documented below.
     */
    @JvmName("orxbosmpbtqvsqwm")
    public suspend fun oauth2ClientCredentials(argument: suspend ConnectionAuthConfigOauth2ClientCredentialsArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionAuthConfigOauth2ClientCredentialsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.oauth2ClientCredentials = mapped
    }

    /**
     * @param value OAuth2 JWT Bearer for Authentication.
     * Structure is documented below.
     */
    @JvmName("poqxlashxrxuyotv")
    public suspend fun oauth2JwtBearer(`value`: ConnectionAuthConfigOauth2JwtBearerArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oauth2JwtBearer = mapped
    }

    /**
     * @param argument OAuth2 JWT Bearer for Authentication.
     * Structure is documented below.
     */
    @JvmName("gkglsegilonlcipm")
    public suspend fun oauth2JwtBearer(argument: suspend ConnectionAuthConfigOauth2JwtBearerArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionAuthConfigOauth2JwtBearerArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.oauth2JwtBearer = mapped
    }

    /**
     * @param value SSH Public Key for Authentication.
     * Structure is documented below.
     */
    @JvmName("ulngccvkdapkxyll")
    public suspend fun sshPublicKey(`value`: ConnectionAuthConfigSshPublicKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sshPublicKey = mapped
    }

    /**
     * @param argument SSH Public Key for Authentication.
     * Structure is documented below.
     */
    @JvmName("agtlgsqqjhqamdya")
    public suspend fun sshPublicKey(argument: suspend ConnectionAuthConfigSshPublicKeyArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionAuthConfigSshPublicKeyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sshPublicKey = mapped
    }

    /**
     * @param value User password for Authentication.
     * Structure is documented below.
     */
    @JvmName("xxcaruflicawtqqo")
    public suspend fun userPassword(`value`: ConnectionAuthConfigUserPasswordArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userPassword = mapped
    }

    /**
     * @param argument User password for Authentication.
     * Structure is documented below.
     */
    @JvmName("isevqgjmpnbcucon")
    public suspend fun userPassword(argument: suspend ConnectionAuthConfigUserPasswordArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionAuthConfigUserPasswordArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.userPassword = mapped
    }

    internal fun build(): ConnectionAuthConfigArgs = ConnectionAuthConfigArgs(
        additionalVariables = additionalVariables,
        authKey = authKey,
        authType = authType ?: throw PulumiNullFieldException("authType"),
        oauth2AuthCodeFlow = oauth2AuthCodeFlow,
        oauth2ClientCredentials = oauth2ClientCredentials,
        oauth2JwtBearer = oauth2JwtBearer,
        sshPublicKey = sshPublicKey,
        userPassword = userPassword,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy