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

com.pulumi.azure.securitycenter.kotlin.inputs.AutomationSourceArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.securitycenter.kotlin.inputs

import com.pulumi.azure.securitycenter.inputs.AutomationSourceArgs.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

/**
 *
 * @property eventSource Type of data that will trigger this automation. Must be one of `Alerts`, `Assessments`, `AssessmentsSnapshot`, `RegulatoryComplianceAssessment`, `RegulatoryComplianceAssessmentSnapshot`, `SecureScoreControls`, `SecureScoreControlsSnapshot`, `SecureScores`, `SecureScoresSnapshot`, `SubAssessments` or `SubAssessmentsSnapshot`. Note. assessments are also referred to as recommendations
 * @property ruleSets A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
 * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
 */
public data class AutomationSourceArgs(
    public val eventSource: Output,
    public val ruleSets: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.securitycenter.inputs.AutomationSourceArgs =
        com.pulumi.azure.securitycenter.inputs.AutomationSourceArgs.builder()
            .eventSource(eventSource.applyValue({ args0 -> args0 }))
            .ruleSets(
                ruleSets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AutomationSourceArgs].
 */
@PulumiTagMarker
public class AutomationSourceArgsBuilder internal constructor() {
    private var eventSource: Output? = null

    private var ruleSets: Output>? = null

    /**
     * @param value Type of data that will trigger this automation. Must be one of `Alerts`, `Assessments`, `AssessmentsSnapshot`, `RegulatoryComplianceAssessment`, `RegulatoryComplianceAssessmentSnapshot`, `SecureScoreControls`, `SecureScoreControlsSnapshot`, `SecureScores`, `SecureScoresSnapshot`, `SubAssessments` or `SubAssessmentsSnapshot`. Note. assessments are also referred to as recommendations
     */
    @JvmName("gaoctskxufigkhta")
    public suspend fun eventSource(`value`: Output) {
        this.eventSource = value
    }

    /**
     * @param value A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
     * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
     */
    @JvmName("eduqlyjwmdveucli")
    public suspend fun ruleSets(`value`: Output>) {
        this.ruleSets = value
    }

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

    /**
     * @param values A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
     * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
     */
    @JvmName("vktlnibkotuorjsm")
    public suspend fun ruleSets(values: List>) {
        this.ruleSets = Output.all(values)
    }

    /**
     * @param value Type of data that will trigger this automation. Must be one of `Alerts`, `Assessments`, `AssessmentsSnapshot`, `RegulatoryComplianceAssessment`, `RegulatoryComplianceAssessmentSnapshot`, `SecureScoreControls`, `SecureScoreControlsSnapshot`, `SecureScores`, `SecureScoresSnapshot`, `SubAssessments` or `SubAssessmentsSnapshot`. Note. assessments are also referred to as recommendations
     */
    @JvmName("xliqwnhjmbyhgpsd")
    public suspend fun eventSource(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventSource = mapped
    }

    /**
     * @param value A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
     * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
     */
    @JvmName("rrvgkhghwbvaqhlk")
    public suspend fun ruleSets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ruleSets = mapped
    }

    /**
     * @param argument A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
     * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
     */
    @JvmName("yirhkgajfplynrer")
    public suspend fun ruleSets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AutomationSourceRuleSetArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ruleSets = mapped
    }

    /**
     * @param argument A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
     * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
     */
    @JvmName("jxulmbposgbukchs")
    public suspend fun ruleSets(vararg argument: suspend AutomationSourceRuleSetArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AutomationSourceRuleSetArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ruleSets = mapped
    }

    /**
     * @param argument A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
     * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
     */
    @JvmName("utatiumqheyomhav")
    public suspend fun ruleSets(argument: suspend AutomationSourceRuleSetArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AutomationSourceRuleSetArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ruleSets = mapped
    }

    /**
     * @param values A set of rules which evaluate upon event and data interception. This is defined in one or more `rule_set` blocks as defined below.
     * > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them.
     */
    @JvmName("ieocsmqhhntqhjtq")
    public suspend fun ruleSets(vararg values: AutomationSourceRuleSetArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ruleSets = mapped
    }

    internal fun build(): AutomationSourceArgs = AutomationSourceArgs(
        eventSource = eventSource ?: throw PulumiNullFieldException("eventSource"),
        ruleSets = ruleSets,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy