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

com.pulumi.azurenative.authorization.kotlin.inputs.ParameterDefinitionsValueArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.authorization.kotlin.inputs

import com.pulumi.azurenative.authorization.inputs.ParameterDefinitionsValueArgs.builder
import com.pulumi.azurenative.authorization.kotlin.enums.ParameterType
import com.pulumi.core.Either
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The definition of a parameter that can be provided to the policy.
 * @property allowedValues The allowed values for the parameter.
 * @property defaultValue The default value for the parameter if no value is provided.
 * @property metadata General metadata for the parameter.
 * @property schema Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/.
 * @property type The data type of the parameter.
 */
public data class ParameterDefinitionsValueArgs(
    public val allowedValues: Output>? = null,
    public val defaultValue: Output? = null,
    public val metadata: Output? = null,
    public val schema: Output? = null,
    public val type: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.authorization.inputs.ParameterDefinitionsValueArgs =
        com.pulumi.azurenative.authorization.inputs.ParameterDefinitionsValueArgs.builder()
            .allowedValues(allowedValues?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .defaultValue(defaultValue?.applyValue({ args0 -> args0 }))
            .metadata(metadata?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .schema(schema?.applyValue({ args0 -> args0 }))
            .type(
                type?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var defaultValue: Output? = null

    private var metadata: Output? = null

    private var schema: Output? = null

    private var type: Output>? = null

    /**
     * @param value The allowed values for the parameter.
     */
    @JvmName("pkpfaclrgxttbkqp")
    public suspend fun allowedValues(`value`: Output>) {
        this.allowedValues = value
    }

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

    /**
     * @param values The allowed values for the parameter.
     */
    @JvmName("xtnihferpocdwxxt")
    public suspend fun allowedValues(values: List>) {
        this.allowedValues = Output.all(values)
    }

    /**
     * @param value The default value for the parameter if no value is provided.
     */
    @JvmName("bxfagonijofmkikk")
    public suspend fun defaultValue(`value`: Output) {
        this.defaultValue = value
    }

    /**
     * @param value General metadata for the parameter.
     */
    @JvmName("pnjejmgpnktngvae")
    public suspend fun metadata(`value`: Output) {
        this.metadata = value
    }

    /**
     * @param value Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/.
     */
    @JvmName("gjosduflbpgygmtq")
    public suspend fun schema(`value`: Output) {
        this.schema = value
    }

    /**
     * @param value The data type of the parameter.
     */
    @JvmName("mkrikrqhvievrjqt")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value The allowed values for the parameter.
     */
    @JvmName("uryjgwcleqsroaar")
    public suspend fun allowedValues(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedValues = mapped
    }

    /**
     * @param values The allowed values for the parameter.
     */
    @JvmName("wybgtgcwcuyueddu")
    public suspend fun allowedValues(vararg values: Any) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedValues = mapped
    }

    /**
     * @param value The default value for the parameter if no value is provided.
     */
    @JvmName("lhbpcsclrlkxyhie")
    public suspend fun defaultValue(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultValue = mapped
    }

    /**
     * @param value General metadata for the parameter.
     */
    @JvmName("qdafxxodmkkvkugq")
    public suspend fun metadata(`value`: ParameterDefinitionsValueMetadataArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param argument General metadata for the parameter.
     */
    @JvmName("ottslrrqrqqkyovb")
    public suspend fun metadata(argument: suspend ParameterDefinitionsValueMetadataArgsBuilder.() -> Unit) {
        val toBeMapped = ParameterDefinitionsValueMetadataArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.metadata = mapped
    }

    /**
     * @param value Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/.
     */
    @JvmName("wmlidoddnxejjeal")
    public suspend fun schema(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schema = mapped
    }

    /**
     * @param value The data type of the parameter.
     */
    @JvmName("erujajioocuwkjnk")
    public suspend fun type(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The data type of the parameter.
     */
    @JvmName("lfirovxjotteoyld")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The data type of the parameter.
     */
    @JvmName("kxltgaraolymmpdk")
    public fun type(`value`: ParameterType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ParameterDefinitionsValueArgs = ParameterDefinitionsValueArgs(
        allowedValues = allowedValues,
        defaultValue = defaultValue,
        metadata = metadata,
        schema = schema,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy