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

com.pulumi.awsnative.evidently.kotlin.FeatureArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.evidently.kotlin

import com.pulumi.awsnative.evidently.FeatureArgs.builder
import com.pulumi.awsnative.evidently.kotlin.enums.FeatureEvaluationStrategy
import com.pulumi.awsnative.evidently.kotlin.inputs.FeatureEntityOverrideArgs
import com.pulumi.awsnative.evidently.kotlin.inputs.FeatureEntityOverrideArgsBuilder
import com.pulumi.awsnative.evidently.kotlin.inputs.FeatureVariationObjectArgs
import com.pulumi.awsnative.evidently.kotlin.inputs.FeatureVariationObjectArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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

/**
 * Resource Type definition for AWS::Evidently::Feature.
 * @property defaultVariation The name of the variation to use as the default variation. The default variation is served to users who are not allocated to any ongoing launches or experiments of this feature.
 * This variation must also be listed in the `Variations` structure.
 * If you omit `DefaultVariation` , the first variation listed in the `Variations` structure is used as the default variation.
 * @property description An optional description of the feature.
 * @property entityOverrides Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
 * @property evaluationStrategy Specify `ALL_RULES` to activate the traffic allocation specified by any ongoing launches or experiments. Specify `DEFAULT_VARIATION` to serve the default variation to all users instead.
 * @property name The name for the feature. It can include up to 127 characters.
 * @property project The name or ARN of the project that is to contain the new feature.
 * @property tags An array of key-value pairs to apply to this resource.
 * @property variations An array of structures that contain the configuration of the feature's different variations.
 * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
 */
public data class FeatureArgs(
    public val defaultVariation: Output? = null,
    public val description: Output? = null,
    public val entityOverrides: Output>? = null,
    public val evaluationStrategy: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val tags: Output>? = null,
    public val variations: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.evidently.FeatureArgs =
        com.pulumi.awsnative.evidently.FeatureArgs.builder()
            .defaultVariation(defaultVariation?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .entityOverrides(
                entityOverrides?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .evaluationStrategy(
                evaluationStrategy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .variations(
                variations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [FeatureArgs].
 */
@PulumiTagMarker
public class FeatureArgsBuilder internal constructor() {
    private var defaultVariation: Output? = null

    private var description: Output? = null

    private var entityOverrides: Output>? = null

    private var evaluationStrategy: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var tags: Output>? = null

    private var variations: Output>? = null

    /**
     * @param value The name of the variation to use as the default variation. The default variation is served to users who are not allocated to any ongoing launches or experiments of this feature.
     * This variation must also be listed in the `Variations` structure.
     * If you omit `DefaultVariation` , the first variation listed in the `Variations` structure is used as the default variation.
     */
    @JvmName("xphpsfvoejlfnujw")
    public suspend fun defaultVariation(`value`: Output) {
        this.defaultVariation = value
    }

    /**
     * @param value An optional description of the feature.
     */
    @JvmName("pcwpptwaqsidxajk")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
     */
    @JvmName("phuspgekrvnbphqf")
    public suspend fun entityOverrides(`value`: Output>) {
        this.entityOverrides = value
    }

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

    /**
     * @param values Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
     */
    @JvmName("ppfcmjelxgpyjylo")
    public suspend fun entityOverrides(values: List>) {
        this.entityOverrides = Output.all(values)
    }

    /**
     * @param value Specify `ALL_RULES` to activate the traffic allocation specified by any ongoing launches or experiments. Specify `DEFAULT_VARIATION` to serve the default variation to all users instead.
     */
    @JvmName("lhyempcufrvulqmw")
    public suspend fun evaluationStrategy(`value`: Output) {
        this.evaluationStrategy = value
    }

    /**
     * @param value The name for the feature. It can include up to 127 characters.
     */
    @JvmName("ycxnjrbaicbeiugf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name or ARN of the project that is to contain the new feature.
     */
    @JvmName("poomwxhbnqakqort")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("wetbfidviarcadud")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("ctfciujvsdlfqfrj")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value An array of structures that contain the configuration of the feature's different variations.
     * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
     */
    @JvmName("ybryhctvavoidajo")
    public suspend fun variations(`value`: Output>) {
        this.variations = value
    }

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

    /**
     * @param values An array of structures that contain the configuration of the feature's different variations.
     * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
     */
    @JvmName("scmxfuqbencyrnuu")
    public suspend fun variations(values: List>) {
        this.variations = Output.all(values)
    }

    /**
     * @param value The name of the variation to use as the default variation. The default variation is served to users who are not allocated to any ongoing launches or experiments of this feature.
     * This variation must also be listed in the `Variations` structure.
     * If you omit `DefaultVariation` , the first variation listed in the `Variations` structure is used as the default variation.
     */
    @JvmName("rnbyfxxvxuqeueqk")
    public suspend fun defaultVariation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultVariation = mapped
    }

    /**
     * @param value An optional description of the feature.
     */
    @JvmName("bcnnjuafcwnkqedb")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
     */
    @JvmName("vvxnijqlnhnlwnxd")
    public suspend fun entityOverrides(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.entityOverrides = mapped
    }

    /**
     * @param argument Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
     */
    @JvmName("aumgedknegywkmhb")
    public suspend fun entityOverrides(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FeatureEntityOverrideArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.entityOverrides = mapped
    }

    /**
     * @param argument Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
     */
    @JvmName("wrutsotbhqohwsbf")
    public suspend fun entityOverrides(vararg argument: suspend FeatureEntityOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FeatureEntityOverrideArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.entityOverrides = mapped
    }

    /**
     * @param argument Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
     */
    @JvmName("hanavxwjeplcdjec")
    public suspend fun entityOverrides(argument: suspend FeatureEntityOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FeatureEntityOverrideArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.entityOverrides = mapped
    }

    /**
     * @param values Specify users that should always be served a specific variation of a feature. Each user is specified by a key-value pair . For each key, specify a user by entering their user ID, account ID, or some other identifier. For the value, specify the name of the variation that they are to be served.
     */
    @JvmName("aywairnelcqbpgbh")
    public suspend fun entityOverrides(vararg values: FeatureEntityOverrideArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.entityOverrides = mapped
    }

    /**
     * @param value Specify `ALL_RULES` to activate the traffic allocation specified by any ongoing launches or experiments. Specify `DEFAULT_VARIATION` to serve the default variation to all users instead.
     */
    @JvmName("rspmwmfpfbbdrnsl")
    public suspend fun evaluationStrategy(`value`: FeatureEvaluationStrategy?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.evaluationStrategy = mapped
    }

    /**
     * @param value The name for the feature. It can include up to 127 characters.
     */
    @JvmName("ctjktderuehonatt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The name or ARN of the project that is to contain the new feature.
     */
    @JvmName("afgwxjanmqovnuui")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("nfflljrcvaytpvga")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("akwfchiumoxhhsqw")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("jhdwaplemqsyrwuu")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("opnclodkqymbxjkq")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("jwocruasbkwtgmsd")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value An array of structures that contain the configuration of the feature's different variations.
     * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
     */
    @JvmName("uuonyfxmhqgjykqh")
    public suspend fun variations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.variations = mapped
    }

    /**
     * @param argument An array of structures that contain the configuration of the feature's different variations.
     * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
     */
    @JvmName("jpfttopqpdmsamdg")
    public suspend fun variations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FeatureVariationObjectArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.variations = mapped
    }

    /**
     * @param argument An array of structures that contain the configuration of the feature's different variations.
     * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
     */
    @JvmName("hwrbxpnoejmshbvr")
    public suspend fun variations(vararg argument: suspend FeatureVariationObjectArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FeatureVariationObjectArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.variations = mapped
    }

    /**
     * @param argument An array of structures that contain the configuration of the feature's different variations.
     * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
     */
    @JvmName("ivyodqlhjqwpdjus")
    public suspend fun variations(argument: suspend FeatureVariationObjectArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FeatureVariationObjectArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.variations = mapped
    }

    /**
     * @param values An array of structures that contain the configuration of the feature's different variations.
     * Each `VariationObject` in the `Variations` array for a feature must have the same type of value ( `BooleanValue` , `DoubleValue` , `LongValue` or `StringValue` ).
     */
    @JvmName("coceurbbnqbsutvi")
    public suspend fun variations(vararg values: FeatureVariationObjectArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.variations = mapped
    }

    internal fun build(): FeatureArgs = FeatureArgs(
        defaultVariation = defaultVariation,
        description = description,
        entityOverrides = entityOverrides,
        evaluationStrategy = evaluationStrategy,
        name = name,
        project = project,
        tags = tags,
        variations = variations,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy