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

com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveSliArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.applicationsignals.kotlin.inputs

import com.pulumi.awsnative.applicationsignals.inputs.ServiceLevelObjectiveSliArgs.builder
import com.pulumi.awsnative.applicationsignals.kotlin.enums.ServiceLevelObjectiveSliComparisonOperator
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.Double
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * This structure contains information about the performance metric that an SLO monitors.
 * @property comparisonOperator The arithmetic operation used when comparing the specified metric to the threshold.
 * @property metricThreshold The value that the SLI metric is compared to.
 * @property sliMetric Use this structure to specify the metric to be used for the SLO.
 */
public data class ServiceLevelObjectiveSliArgs(
    public val comparisonOperator: Output,
    public val metricThreshold: Output,
    public val sliMetric: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.applicationsignals.inputs.ServiceLevelObjectiveSliArgs = com.pulumi.awsnative.applicationsignals.inputs.ServiceLevelObjectiveSliArgs.builder()
        .comparisonOperator(
            comparisonOperator.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .metricThreshold(metricThreshold.applyValue({ args0 -> args0 }))
        .sliMetric(sliMetric.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ServiceLevelObjectiveSliArgs].
 */
@PulumiTagMarker
public class ServiceLevelObjectiveSliArgsBuilder internal constructor() {
    private var comparisonOperator: Output? = null

    private var metricThreshold: Output? = null

    private var sliMetric: Output? = null

    /**
     * @param value The arithmetic operation used when comparing the specified metric to the threshold.
     */
    @JvmName("icquvtwmjhxtabrv")
    public suspend fun comparisonOperator(`value`: Output) {
        this.comparisonOperator = value
    }

    /**
     * @param value The value that the SLI metric is compared to.
     */
    @JvmName("ekfnydgkqlhjimds")
    public suspend fun metricThreshold(`value`: Output) {
        this.metricThreshold = value
    }

    /**
     * @param value Use this structure to specify the metric to be used for the SLO.
     */
    @JvmName("twyalcmnbxssvjgo")
    public suspend fun sliMetric(`value`: Output) {
        this.sliMetric = value
    }

    /**
     * @param value The arithmetic operation used when comparing the specified metric to the threshold.
     */
    @JvmName("xdpbbruxduftafmh")
    public suspend fun comparisonOperator(`value`: ServiceLevelObjectiveSliComparisonOperator) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.comparisonOperator = mapped
    }

    /**
     * @param value The value that the SLI metric is compared to.
     */
    @JvmName("fsouxhpehrbbiwvb")
    public suspend fun metricThreshold(`value`: Double) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metricThreshold = mapped
    }

    /**
     * @param value Use this structure to specify the metric to be used for the SLO.
     */
    @JvmName("femascxtsfxndrxl")
    public suspend fun sliMetric(`value`: ServiceLevelObjectiveSliMetricArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sliMetric = mapped
    }

    /**
     * @param argument Use this structure to specify the metric to be used for the SLO.
     */
    @JvmName("wnviidimymturnkg")
    public suspend fun sliMetric(argument: suspend ServiceLevelObjectiveSliMetricArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceLevelObjectiveSliMetricArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sliMetric = mapped
    }

    internal fun build(): ServiceLevelObjectiveSliArgs = ServiceLevelObjectiveSliArgs(
        comparisonOperator = comparisonOperator ?: throw PulumiNullFieldException("comparisonOperator"),
        metricThreshold = metricThreshold ?: throw PulumiNullFieldException("metricThreshold"),
        sliMetric = sliMetric ?: throw PulumiNullFieldException("sliMetric"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy