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

com.pulumi.azurenative.search.kotlin.inputs.DataPlaneAuthOptionsArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.search.kotlin.inputs

import com.pulumi.azurenative.search.inputs.DataPlaneAuthOptionsArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Any
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true.
 * @property aadOrApiKey Indicates that either the API key or an access token from Azure Active Directory can be used for authentication.
 * @property apiKeyOnly Indicates that only the API key needs to be used for authentication.
 */
public data class DataPlaneAuthOptionsArgs(
    public val aadOrApiKey: Output? = null,
    public val apiKeyOnly: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.search.inputs.DataPlaneAuthOptionsArgs =
        com.pulumi.azurenative.search.inputs.DataPlaneAuthOptionsArgs.builder()
            .aadOrApiKey(aadOrApiKey?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .apiKeyOnly(apiKeyOnly?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DataPlaneAuthOptionsArgs].
 */
@PulumiTagMarker
public class DataPlaneAuthOptionsArgsBuilder internal constructor() {
    private var aadOrApiKey: Output? = null

    private var apiKeyOnly: Output? = null

    /**
     * @param value Indicates that either the API key or an access token from Azure Active Directory can be used for authentication.
     */
    @JvmName("kykgftkrtnustgsg")
    public suspend fun aadOrApiKey(`value`: Output) {
        this.aadOrApiKey = value
    }

    /**
     * @param value Indicates that only the API key needs to be used for authentication.
     */
    @JvmName("tjqygtuolxnnsoig")
    public suspend fun apiKeyOnly(`value`: Output) {
        this.apiKeyOnly = value
    }

    /**
     * @param value Indicates that either the API key or an access token from Azure Active Directory can be used for authentication.
     */
    @JvmName("gltiekqhyjlaxuvq")
    public suspend fun aadOrApiKey(`value`: DataPlaneAadOrApiKeyAuthOptionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aadOrApiKey = mapped
    }

    /**
     * @param argument Indicates that either the API key or an access token from Azure Active Directory can be used for authentication.
     */
    @JvmName("cabnpjdfvohaekqs")
    public suspend fun aadOrApiKey(argument: suspend DataPlaneAadOrApiKeyAuthOptionArgsBuilder.() -> Unit) {
        val toBeMapped = DataPlaneAadOrApiKeyAuthOptionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.aadOrApiKey = mapped
    }

    /**
     * @param value Indicates that only the API key needs to be used for authentication.
     */
    @JvmName("wxectfkckxltphor")
    public suspend fun apiKeyOnly(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiKeyOnly = mapped
    }

    internal fun build(): DataPlaneAuthOptionsArgs = DataPlaneAuthOptionsArgs(
        aadOrApiKey = aadOrApiKey,
        apiKeyOnly = apiKeyOnly,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy