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

com.pulumi.gcp.integrationconnectors.kotlin.inputs.ConnectionAuthConfigOauth2AuthCodeFlowArgs.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.ConnectionAuthConfigOauth2AuthCodeFlowArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property authUri Auth URL for Authorization Code Flow.
 * @property clientId Client ID for user-provided OAuth app.
 * @property clientSecret Client secret for user-provided OAuth app.
 * @property enablePkce Whether to enable PKCE when the user performs the auth code flow.
 * @property scopes Scopes the connection will request when the user performs the auth code flow.
 */
public data class ConnectionAuthConfigOauth2AuthCodeFlowArgs(
    public val authUri: Output? = null,
    public val clientId: Output? = null,
    public val clientSecret: Output? = null,
    public val enablePkce: Output? = null,
    public val scopes: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.integrationconnectors.inputs.ConnectionAuthConfigOauth2AuthCodeFlowArgs =
        com.pulumi.gcp.integrationconnectors.inputs.ConnectionAuthConfigOauth2AuthCodeFlowArgs.builder()
            .authUri(authUri?.applyValue({ args0 -> args0 }))
            .clientId(clientId?.applyValue({ args0 -> args0 }))
            .clientSecret(clientSecret?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enablePkce(enablePkce?.applyValue({ args0 -> args0 }))
            .scopes(scopes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ConnectionAuthConfigOauth2AuthCodeFlowArgs].
 */
@PulumiTagMarker
public class ConnectionAuthConfigOauth2AuthCodeFlowArgsBuilder internal constructor() {
    private var authUri: Output? = null

    private var clientId: Output? = null

    private var clientSecret: Output? = null

    private var enablePkce: Output? = null

    private var scopes: Output>? = null

    /**
     * @param value Auth URL for Authorization Code Flow.
     */
    @JvmName("yktbpjdkjqfkoibb")
    public suspend fun authUri(`value`: Output) {
        this.authUri = value
    }

    /**
     * @param value Client ID for user-provided OAuth app.
     */
    @JvmName("uimgtsdaqkdahrfv")
    public suspend fun clientId(`value`: Output) {
        this.clientId = value
    }

    /**
     * @param value Client secret for user-provided OAuth app.
     */
    @JvmName("fgwlexiybvkugrdj")
    public suspend fun clientSecret(`value`: Output) {
        this.clientSecret = value
    }

    /**
     * @param value Whether to enable PKCE when the user performs the auth code flow.
     */
    @JvmName("dwbwjenqhvllecuo")
    public suspend fun enablePkce(`value`: Output) {
        this.enablePkce = value
    }

    /**
     * @param value Scopes the connection will request when the user performs the auth code flow.
     */
    @JvmName("whaxqyaecrunqllu")
    public suspend fun scopes(`value`: Output>) {
        this.scopes = value
    }

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

    /**
     * @param values Scopes the connection will request when the user performs the auth code flow.
     */
    @JvmName("offjevgxyrflioex")
    public suspend fun scopes(values: List>) {
        this.scopes = Output.all(values)
    }

    /**
     * @param value Auth URL for Authorization Code Flow.
     */
    @JvmName("rhletjjocafbwrav")
    public suspend fun authUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authUri = mapped
    }

    /**
     * @param value Client ID for user-provided OAuth app.
     */
    @JvmName("xcwwdqlbwqkeetwo")
    public suspend fun clientId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientId = mapped
    }

    /**
     * @param value Client secret for user-provided OAuth app.
     */
    @JvmName("tpwqcewuatrpqlhc")
    public suspend fun clientSecret(`value`: ConnectionAuthConfigOauth2AuthCodeFlowClientSecretArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientSecret = mapped
    }

    /**
     * @param argument Client secret for user-provided OAuth app.
     */
    @JvmName("adibngljyrnhkpyv")
    public suspend fun clientSecret(argument: suspend ConnectionAuthConfigOauth2AuthCodeFlowClientSecretArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionAuthConfigOauth2AuthCodeFlowClientSecretArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.clientSecret = mapped
    }

    /**
     * @param value Whether to enable PKCE when the user performs the auth code flow.
     */
    @JvmName("jkbgoonkxqdmhhyn")
    public suspend fun enablePkce(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enablePkce = mapped
    }

    /**
     * @param value Scopes the connection will request when the user performs the auth code flow.
     */
    @JvmName("mgqeqwlxyabbkvln")
    public suspend fun scopes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    /**
     * @param values Scopes the connection will request when the user performs the auth code flow.
     */
    @JvmName("ollkqmcfhxajxuaf")
    public suspend fun scopes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    internal fun build(): ConnectionAuthConfigOauth2AuthCodeFlowArgs =
        ConnectionAuthConfigOauth2AuthCodeFlowArgs(
            authUri = authUri,
            clientId = clientId,
            clientSecret = clientSecret,
            enablePkce = enablePkce,
            scopes = scopes,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy