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

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

package com.pulumi.awsnative.iot.kotlin.inputs

import com.pulumi.awsnative.iot.inputs.JobTemplateAbortCriteriaArgs.builder
import com.pulumi.awsnative.iot.kotlin.enums.JobTemplateAction
import com.pulumi.awsnative.iot.kotlin.enums.JobTemplateFailureType
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 kotlin.Double
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The criteria that determine when and how a job abort takes place.
 * @property action The type of job action to take to initiate the job abort.
 * @property failureType The type of job execution failures that can initiate a job abort.
 * @property minNumberOfExecutedThings The minimum number of things which must receive job execution notifications before the job can be aborted.
 * @property thresholdPercentage The minimum percentage of job execution failures that must occur to initiate the job abort.
 */
public data class JobTemplateAbortCriteriaArgs(
    public val action: Output,
    public val failureType: Output,
    public val minNumberOfExecutedThings: Output,
    public val thresholdPercentage: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iot.inputs.JobTemplateAbortCriteriaArgs =
        com.pulumi.awsnative.iot.inputs.JobTemplateAbortCriteriaArgs.builder()
            .action(action.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .failureType(failureType.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .minNumberOfExecutedThings(minNumberOfExecutedThings.applyValue({ args0 -> args0 }))
            .thresholdPercentage(thresholdPercentage.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [JobTemplateAbortCriteriaArgs].
 */
@PulumiTagMarker
public class JobTemplateAbortCriteriaArgsBuilder internal constructor() {
    private var action: Output? = null

    private var failureType: Output? = null

    private var minNumberOfExecutedThings: Output? = null

    private var thresholdPercentage: Output? = null

    /**
     * @param value The type of job action to take to initiate the job abort.
     */
    @JvmName("rnwaxrskcmjjjosf")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value The type of job execution failures that can initiate a job abort.
     */
    @JvmName("mqsyhbpbyqxalidh")
    public suspend fun failureType(`value`: Output) {
        this.failureType = value
    }

    /**
     * @param value The minimum number of things which must receive job execution notifications before the job can be aborted.
     */
    @JvmName("bifdpbacbsnieacs")
    public suspend fun minNumberOfExecutedThings(`value`: Output) {
        this.minNumberOfExecutedThings = value
    }

    /**
     * @param value The minimum percentage of job execution failures that must occur to initiate the job abort.
     */
    @JvmName("jpngcheryeqxavix")
    public suspend fun thresholdPercentage(`value`: Output) {
        this.thresholdPercentage = value
    }

    /**
     * @param value The type of job action to take to initiate the job abort.
     */
    @JvmName("vodsgydxnbplyxrr")
    public suspend fun action(`value`: JobTemplateAction) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value The type of job execution failures that can initiate a job abort.
     */
    @JvmName("neqxbalcajgolmgq")
    public suspend fun failureType(`value`: JobTemplateFailureType) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.failureType = mapped
    }

    /**
     * @param value The minimum number of things which must receive job execution notifications before the job can be aborted.
     */
    @JvmName("bvbwsarbtjwqjpfk")
    public suspend fun minNumberOfExecutedThings(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.minNumberOfExecutedThings = mapped
    }

    /**
     * @param value The minimum percentage of job execution failures that must occur to initiate the job abort.
     */
    @JvmName("dkbjmabuchcojfts")
    public suspend fun thresholdPercentage(`value`: Double) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.thresholdPercentage = mapped
    }

    internal fun build(): JobTemplateAbortCriteriaArgs = JobTemplateAbortCriteriaArgs(
        action = action ?: throw PulumiNullFieldException("action"),
        failureType = failureType ?: throw PulumiNullFieldException("failureType"),
        minNumberOfExecutedThings = minNumberOfExecutedThings ?: throw
            PulumiNullFieldException("minNumberOfExecutedThings"),
        thresholdPercentage = thresholdPercentage ?: throw PulumiNullFieldException("thresholdPercentage"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy