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

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

package com.pulumi.awsnative.evidently.kotlin.inputs

import com.pulumi.awsnative.evidently.inputs.ExperimentOnlineAbConfigObjectArgs.builder
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

/**
 *
 * @property controlTreatmentName The name of the variation that is to be the default variation that the other variations are compared to.
 * @property treatmentWeights A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
 */
public data class ExperimentOnlineAbConfigObjectArgs(
    public val controlTreatmentName: Output? = null,
    public val treatmentWeights: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.evidently.inputs.ExperimentOnlineAbConfigObjectArgs =
        com.pulumi.awsnative.evidently.inputs.ExperimentOnlineAbConfigObjectArgs.builder()
            .controlTreatmentName(controlTreatmentName?.applyValue({ args0 -> args0 }))
            .treatmentWeights(
                treatmentWeights?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ExperimentOnlineAbConfigObjectArgs].
 */
@PulumiTagMarker
public class ExperimentOnlineAbConfigObjectArgsBuilder internal constructor() {
    private var controlTreatmentName: Output? = null

    private var treatmentWeights: Output>? = null

    /**
     * @param value The name of the variation that is to be the default variation that the other variations are compared to.
     */
    @JvmName("gxvfnfhvcdvlsubr")
    public suspend fun controlTreatmentName(`value`: Output) {
        this.controlTreatmentName = value
    }

    /**
     * @param value A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
     */
    @JvmName("gfxwkyiilbcxjtul")
    public suspend fun treatmentWeights(`value`: Output>) {
        this.treatmentWeights = value
    }

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

    /**
     * @param values A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
     */
    @JvmName("yohndcwakinjxkyv")
    public suspend fun treatmentWeights(values: List>) {
        this.treatmentWeights = Output.all(values)
    }

    /**
     * @param value The name of the variation that is to be the default variation that the other variations are compared to.
     */
    @JvmName("mdfhqdjvwamiofrv")
    public suspend fun controlTreatmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.controlTreatmentName = mapped
    }

    /**
     * @param value A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
     */
    @JvmName("hqbnotrwnnwepayi")
    public suspend fun treatmentWeights(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.treatmentWeights = mapped
    }

    /**
     * @param argument A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
     */
    @JvmName("gpncgntrbymjomro")
    public suspend fun treatmentWeights(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ExperimentTreatmentToWeightArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.treatmentWeights = mapped
    }

    /**
     * @param argument A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
     */
    @JvmName("skeqqwgxrarcxtiw")
    public suspend fun treatmentWeights(vararg argument: suspend ExperimentTreatmentToWeightArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ExperimentTreatmentToWeightArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.treatmentWeights = mapped
    }

    /**
     * @param argument A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
     */
    @JvmName("ckkhqiaucqfdluci")
    public suspend fun treatmentWeights(argument: suspend ExperimentTreatmentToWeightArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ExperimentTreatmentToWeightArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.treatmentWeights = mapped
    }

    /**
     * @param values A set of key-value pairs. The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
     */
    @JvmName("krapedtenyaxlabb")
    public suspend fun treatmentWeights(vararg values: ExperimentTreatmentToWeightArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.treatmentWeights = mapped
    }

    internal fun build(): ExperimentOnlineAbConfigObjectArgs = ExperimentOnlineAbConfigObjectArgs(
        controlTreatmentName = controlTreatmentName,
        treatmentWeights = treatmentWeights,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy