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

com.pulumi.azurenative.testbase.kotlin.inputs.TestArgs.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.testbase.kotlin.inputs

import com.pulumi.azurenative.testbase.inputs.TestArgs.builder
import com.pulumi.azurenative.testbase.kotlin.enums.TestType
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.PulumiNullFieldException
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

/**
 * The definition of a Test.
 * @property commands The commands used in the test.
 * @property isActive Indicates if this test is active.It doesn't schedule test for not active Test.
 * @property testType The type of the test.
 */
public data class TestArgs(
    public val commands: Output>,
    public val isActive: Output? = null,
    public val testType: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.testbase.inputs.TestArgs =
        com.pulumi.azurenative.testbase.inputs.TestArgs.builder()
            .commands(
                commands.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .isActive(isActive?.applyValue({ args0 -> args0 }))
            .testType(
                testType.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

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

    private var isActive: Output? = null

    private var testType: Output>? = null

    /**
     * @param value The commands used in the test.
     */
    @JvmName("dakhekicgbtyreks")
    public suspend fun commands(`value`: Output>) {
        this.commands = value
    }

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

    /**
     * @param values The commands used in the test.
     */
    @JvmName("yatgefedrdsnaidk")
    public suspend fun commands(values: List>) {
        this.commands = Output.all(values)
    }

    /**
     * @param value Indicates if this test is active.It doesn't schedule test for not active Test.
     */
    @JvmName("vkbfxglxkuwopcqo")
    public suspend fun isActive(`value`: Output) {
        this.isActive = value
    }

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

    /**
     * @param value The commands used in the test.
     */
    @JvmName("jeanqbmaeimyeaeo")
    public suspend fun commands(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param argument The commands used in the test.
     */
    @JvmName("wdhptjiweisdnawv")
    public suspend fun commands(argument: List Unit>) {
        val toBeMapped = argument.toList().map { CommandArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.commands = mapped
    }

    /**
     * @param argument The commands used in the test.
     */
    @JvmName("grnxyfqengjomthp")
    public suspend fun commands(vararg argument: suspend CommandArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { CommandArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.commands = mapped
    }

    /**
     * @param argument The commands used in the test.
     */
    @JvmName("gstrhbitmeangani")
    public suspend fun commands(argument: suspend CommandArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CommandArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.commands = mapped
    }

    /**
     * @param values The commands used in the test.
     */
    @JvmName("nqvmsynasoedomac")
    public suspend fun commands(vararg values: CommandArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param value Indicates if this test is active.It doesn't schedule test for not active Test.
     */
    @JvmName("vvsagdhnhslphoda")
    public suspend fun isActive(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isActive = mapped
    }

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

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

    /**
     * @param value The type of the test.
     */
    @JvmName("xnpbvnvyroycocsc")
    public fun testType(`value`: TestType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.testType = mapped
    }

    internal fun build(): TestArgs = TestArgs(
        commands = commands ?: throw PulumiNullFieldException("commands"),
        isActive = isActive,
        testType = testType ?: throw PulumiNullFieldException("testType"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy