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

com.pulumi.awsnative.fis.kotlin.inputs.ExperimentTemplateTargetArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.fis.kotlin.inputs

import com.pulumi.awsnative.fis.inputs.ExperimentTemplateTargetArgs.builder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Specifies a target for an experiment.
 * @property filters The filters to apply to identify target resources using specific attributes.
 * @property parameters The parameters for the resource type.
 * @property resourceArns The Amazon Resource Names (ARNs) of the targets.
 * @property resourceTags The tags for the target resources.
 * @property resourceType The resource type.
 * @property selectionMode Scopes the identified resources to a specific count or percentage.
 */
public data class ExperimentTemplateTargetArgs(
    public val filters: Output>? = null,
    public val parameters: Output>? = null,
    public val resourceArns: Output>? = null,
    public val resourceTags: Output>? = null,
    public val resourceType: Output,
    public val selectionMode: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.fis.inputs.ExperimentTemplateTargetArgs =
        com.pulumi.awsnative.fis.inputs.ExperimentTemplateTargetArgs.builder()
            .filters(
                filters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .resourceArns(resourceArns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .resourceTags(
                resourceTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .resourceType(resourceType.applyValue({ args0 -> args0 }))
            .selectionMode(selectionMode.applyValue({ args0 -> args0 })).build()
}

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

    private var parameters: Output>? = null

    private var resourceArns: Output>? = null

    private var resourceTags: Output>? = null

    private var resourceType: Output? = null

    private var selectionMode: Output? = null

    /**
     * @param value The filters to apply to identify target resources using specific attributes.
     */
    @JvmName("wbrhtrhelevirvlo")
    public suspend fun filters(`value`: Output>) {
        this.filters = value
    }

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

    /**
     * @param values The filters to apply to identify target resources using specific attributes.
     */
    @JvmName("lwveiibartwdofjp")
    public suspend fun filters(values: List>) {
        this.filters = Output.all(values)
    }

    /**
     * @param value The parameters for the resource type.
     */
    @JvmName("sbudrwjwuswwlrxd")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value The Amazon Resource Names (ARNs) of the targets.
     */
    @JvmName("aknabnkwtgpngggv")
    public suspend fun resourceArns(`value`: Output>) {
        this.resourceArns = value
    }

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

    /**
     * @param values The Amazon Resource Names (ARNs) of the targets.
     */
    @JvmName("mlsqvvllfagagwch")
    public suspend fun resourceArns(values: List>) {
        this.resourceArns = Output.all(values)
    }

    /**
     * @param value The tags for the target resources.
     */
    @JvmName("chatdbekdtonivbq")
    public suspend fun resourceTags(`value`: Output>) {
        this.resourceTags = value
    }

    /**
     * @param value The resource type.
     */
    @JvmName("lkwbtbvpyrwkhkcl")
    public suspend fun resourceType(`value`: Output) {
        this.resourceType = value
    }

    /**
     * @param value Scopes the identified resources to a specific count or percentage.
     */
    @JvmName("imfystmynarnbotp")
    public suspend fun selectionMode(`value`: Output) {
        this.selectionMode = value
    }

    /**
     * @param value The filters to apply to identify target resources using specific attributes.
     */
    @JvmName("fjsiojsymdcgenbh")
    public suspend fun filters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filters = mapped
    }

    /**
     * @param argument The filters to apply to identify target resources using specific attributes.
     */
    @JvmName("jcirccnmdokpgbfi")
    public suspend fun filters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ExperimentTemplateTargetFilterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.filters = mapped
    }

    /**
     * @param argument The filters to apply to identify target resources using specific attributes.
     */
    @JvmName("ocytmfnyidlwpqyp")
    public suspend fun filters(vararg argument: suspend ExperimentTemplateTargetFilterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ExperimentTemplateTargetFilterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.filters = mapped
    }

    /**
     * @param argument The filters to apply to identify target resources using specific attributes.
     */
    @JvmName("rkduarctefkcwqfw")
    public suspend fun filters(argument: suspend ExperimentTemplateTargetFilterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ExperimentTemplateTargetFilterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.filters = mapped
    }

    /**
     * @param values The filters to apply to identify target resources using specific attributes.
     */
    @JvmName("fqfvikdbcjmssblm")
    public suspend fun filters(vararg values: ExperimentTemplateTargetFilterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.filters = mapped
    }

    /**
     * @param value The parameters for the resource type.
     */
    @JvmName("iuqclsspcdsjvwcg")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values The parameters for the resource type.
     */
    @JvmName("ektuckvpjojtmhom")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The Amazon Resource Names (ARNs) of the targets.
     */
    @JvmName("gyxgqegskigqwmlo")
    public suspend fun resourceArns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceArns = mapped
    }

    /**
     * @param values The Amazon Resource Names (ARNs) of the targets.
     */
    @JvmName("cdifogdnowitqpuf")
    public suspend fun resourceArns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceArns = mapped
    }

    /**
     * @param value The tags for the target resources.
     */
    @JvmName("jitumeyelbpkwwuf")
    public suspend fun resourceTags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceTags = mapped
    }

    /**
     * @param values The tags for the target resources.
     */
    @JvmName("wmmgiriergrlfncf")
    public fun resourceTags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceTags = mapped
    }

    /**
     * @param value The resource type.
     */
    @JvmName("moppqbdiaeirwqtc")
    public suspend fun resourceType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceType = mapped
    }

    /**
     * @param value Scopes the identified resources to a specific count or percentage.
     */
    @JvmName("mfghbujlitekjiqv")
    public suspend fun selectionMode(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectionMode = mapped
    }

    internal fun build(): ExperimentTemplateTargetArgs = ExperimentTemplateTargetArgs(
        filters = filters,
        parameters = parameters,
        resourceArns = resourceArns,
        resourceTags = resourceTags,
        resourceType = resourceType ?: throw PulumiNullFieldException("resourceType"),
        selectionMode = selectionMode ?: throw PulumiNullFieldException("selectionMode"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy