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

com.pulumi.azurenative.authorization.kotlin.VariableValueArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.authorization.kotlin

import com.pulumi.azurenative.authorization.VariableValueArgs.builder
import com.pulumi.azurenative.authorization.kotlin.inputs.PolicyVariableValueColumnValueArgs
import com.pulumi.azurenative.authorization.kotlin.inputs.PolicyVariableValueColumnValueArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The variable value.
 * Azure REST API version: 2022-08-01-preview.
 * ## Example Usage
 * ### Create or update a variable value
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var variableValue = new AzureNative.Authorization.VariableValue("variableValue", new()
 *     {
 *         Values = new[]
 *         {
 *             new AzureNative.Authorization.Inputs.PolicyVariableValueColumnValueArgs
 *             {
 *                 ColumnName = "StringColumn",
 *                 ColumnValue = "SampleValue",
 *             },
 *             new AzureNative.Authorization.Inputs.PolicyVariableValueColumnValueArgs
 *             {
 *                 ColumnName = "IntegerColumn",
 *                 ColumnValue = 10,
 *             },
 *         },
 *         VariableName = "DemoTestVariable",
 *         VariableValueName = "TestValue",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := authorization.NewVariableValue(ctx, "variableValue", &authorization.VariableValueArgs{
 * 			Values: authorization.PolicyVariableValueColumnValueArray{
 * 				&authorization.PolicyVariableValueColumnValueArgs{
 * 					ColumnName:  pulumi.String("StringColumn"),
 * 					ColumnValue: pulumi.Any("SampleValue"),
 * 				},
 * 				&authorization.PolicyVariableValueColumnValueArgs{
 * 					ColumnName:  pulumi.String("IntegerColumn"),
 * 					ColumnValue: pulumi.Any(10),
 * 				},
 * 			},
 * 			VariableName:      pulumi.String("DemoTestVariable"),
 * 			VariableValueName: pulumi.String("TestValue"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.authorization.VariableValue;
 * import com.pulumi.azurenative.authorization.VariableValueArgs;
 * import com.pulumi.azurenative.authorization.inputs.PolicyVariableValueColumnValueArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var variableValue = new VariableValue("variableValue", VariableValueArgs.builder()
 *             .values(
 *                 PolicyVariableValueColumnValueArgs.builder()
 *                     .columnName("StringColumn")
 *                     .columnValue("SampleValue")
 *                     .build(),
 *                 PolicyVariableValueColumnValueArgs.builder()
 *                     .columnName("IntegerColumn")
 *                     .columnValue(10)
 *                     .build())
 *             .variableName("DemoTestVariable")
 *             .variableValueName("TestValue")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:authorization:VariableValue TestValue /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/variables/{variableName}/values/{variableValueName}
 * ```
 * @property values Variable value column value array.
 * @property variableName The name of the variable to operate on.
 * @property variableValueName The name of the variable value to operate on.
 */
public data class VariableValueArgs(
    public val values: Output>? = null,
    public val variableName: Output? = null,
    public val variableValueName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.authorization.VariableValueArgs =
        com.pulumi.azurenative.authorization.VariableValueArgs.builder()
            .values(values?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .variableName(variableName?.applyValue({ args0 -> args0 }))
            .variableValueName(variableValueName?.applyValue({ args0 -> args0 })).build()
}

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

    private var variableName: Output? = null

    private var variableValueName: Output? = null

    /**
     * @param value Variable value column value array.
     */
    @JvmName("ignilvmfwqxlonyb")
    public suspend fun values(`value`: Output>) {
        this.values = value
    }

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

    /**
     * @param values Variable value column value array.
     */
    @JvmName("ajaglnnjdebepias")
    public suspend fun values(values: List>) {
        this.values = Output.all(values)
    }

    /**
     * @param value The name of the variable to operate on.
     */
    @JvmName("makrjjsgvghyjmyt")
    public suspend fun variableName(`value`: Output) {
        this.variableName = value
    }

    /**
     * @param value The name of the variable value to operate on.
     */
    @JvmName("etmchvjdsgqbucld")
    public suspend fun variableValueName(`value`: Output) {
        this.variableValueName = value
    }

    /**
     * @param value Variable value column value array.
     */
    @JvmName("ilubjnmvhvbvxsog")
    public suspend fun values(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.values = mapped
    }

    /**
     * @param argument Variable value column value array.
     */
    @JvmName("pxbbjpghiollqyog")
    public suspend fun values(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PolicyVariableValueColumnValueArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.values = mapped
    }

    /**
     * @param argument Variable value column value array.
     */
    @JvmName("oyraeymahwssrkik")
    public suspend fun values(vararg argument: suspend PolicyVariableValueColumnValueArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PolicyVariableValueColumnValueArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.values = mapped
    }

    /**
     * @param argument Variable value column value array.
     */
    @JvmName("usrqnwdecaphgnlb")
    public suspend fun values(argument: suspend PolicyVariableValueColumnValueArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PolicyVariableValueColumnValueArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.values = mapped
    }

    /**
     * @param values Variable value column value array.
     */
    @JvmName("yhtjgqvsglvmomjw")
    public suspend fun values(vararg values: PolicyVariableValueColumnValueArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.values = mapped
    }

    /**
     * @param value The name of the variable to operate on.
     */
    @JvmName("qauemrsgkvcbnyif")
    public suspend fun variableName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.variableName = mapped
    }

    /**
     * @param value The name of the variable value to operate on.
     */
    @JvmName("isqipspceroesrqw")
    public suspend fun variableValueName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.variableValueName = mapped
    }

    internal fun build(): VariableValueArgs = VariableValueArgs(
        values = values,
        variableName = variableName,
        variableValueName = variableValueName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy