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

com.pulumi.awsnative.sagemaker.kotlin.inputs.InferenceExperimentShadowModeConfigArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.sagemaker.kotlin.inputs

import com.pulumi.awsnative.sagemaker.inputs.InferenceExperimentShadowModeConfigArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The configuration of ShadowMode inference experiment type. Use this field to specify a production variant which takes all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant also specify the percentage of requests that Amazon SageMaker replicates.
 * @property shadowModelVariants List of shadow variant configurations.
 * @property sourceModelVariantName The name of the production variant, which takes all the inference requests.
 */
public data class InferenceExperimentShadowModeConfigArgs(
    public val shadowModelVariants: Output>,
    public val sourceModelVariantName: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.sagemaker.inputs.InferenceExperimentShadowModeConfigArgs =
        com.pulumi.awsnative.sagemaker.inputs.InferenceExperimentShadowModeConfigArgs.builder()
            .shadowModelVariants(
                shadowModelVariants.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .sourceModelVariantName(sourceModelVariantName.applyValue({ args0 -> args0 })).build()
}

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

    private var sourceModelVariantName: Output? = null

    /**
     * @param value List of shadow variant configurations.
     */
    @JvmName("xwtihgvfcjdcjaan")
    public suspend fun shadowModelVariants(`value`: Output>) {
        this.shadowModelVariants = value
    }

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

    /**
     * @param values List of shadow variant configurations.
     */
    @JvmName("kwxlemtkjipnnate")
    public suspend fun shadowModelVariants(values: List>) {
        this.shadowModelVariants = Output.all(values)
    }

    /**
     * @param value The name of the production variant, which takes all the inference requests.
     */
    @JvmName("xtpnutactbpxxfro")
    public suspend fun sourceModelVariantName(`value`: Output) {
        this.sourceModelVariantName = value
    }

    /**
     * @param value List of shadow variant configurations.
     */
    @JvmName("sbraxfyeqpggrdlr")
    public suspend fun shadowModelVariants(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.shadowModelVariants = mapped
    }

    /**
     * @param argument List of shadow variant configurations.
     */
    @JvmName("svgbtpaubsiwcqai")
    public suspend fun shadowModelVariants(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InferenceExperimentShadowModelVariantConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.shadowModelVariants = mapped
    }

    /**
     * @param argument List of shadow variant configurations.
     */
    @JvmName("uxpquprovjejlfsu")
    public suspend fun shadowModelVariants(vararg argument: suspend InferenceExperimentShadowModelVariantConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InferenceExperimentShadowModelVariantConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.shadowModelVariants = mapped
    }

    /**
     * @param argument List of shadow variant configurations.
     */
    @JvmName("nxwqoqpdcwitadko")
    public suspend fun shadowModelVariants(argument: suspend InferenceExperimentShadowModelVariantConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InferenceExperimentShadowModelVariantConfigArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.shadowModelVariants = mapped
    }

    /**
     * @param values List of shadow variant configurations.
     */
    @JvmName("eypxtmtsxhgayoap")
    public suspend fun shadowModelVariants(vararg values: InferenceExperimentShadowModelVariantConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.shadowModelVariants = mapped
    }

    /**
     * @param value The name of the production variant, which takes all the inference requests.
     */
    @JvmName("htgkgagsmewihxuw")
    public suspend fun sourceModelVariantName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceModelVariantName = mapped
    }

    internal fun build(): InferenceExperimentShadowModeConfigArgs =
        InferenceExperimentShadowModeConfigArgs(
            shadowModelVariants = shadowModelVariants ?: throw PulumiNullFieldException("shadowModelVariants"),
            sourceModelVariantName = sourceModelVariantName ?: throw
                PulumiNullFieldException("sourceModelVariantName"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy