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

com.pulumi.googlenative.containeranalysis.v1.kotlin.inputs.VulnerabilityOccurrenceArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.containeranalysis.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.containeranalysis.v1.inputs.VulnerabilityOccurrenceArgs.builder
import com.pulumi.googlenative.containeranalysis.v1.kotlin.enums.VulnerabilityOccurrenceEffectiveSeverity
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

/**
 * An occurrence of a severity vulnerability on a resource.
 * @property cvssV2 The cvss v2 score for the vulnerability.
 * @property cvssv3 The cvss v3 score for the vulnerability.
 * @property effectiveSeverity The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues.
 * @property packageIssue The set of affected locations and their fixes (if available) within the associated resource.
 * @property type The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).
 * @property vexAssessment
 */
public data class VulnerabilityOccurrenceArgs(
    public val cvssV2: Output? = null,
    public val cvssv3: Output? = null,
    public val effectiveSeverity: Output? = null,
    public val packageIssue: Output>,
    public val type: Output? = null,
    public val vexAssessment: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.containeranalysis.v1.inputs.VulnerabilityOccurrenceArgs =
        com.pulumi.googlenative.containeranalysis.v1.inputs.VulnerabilityOccurrenceArgs.builder()
            .cvssV2(cvssV2?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .cvssv3(cvssv3?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .effectiveSeverity(effectiveSeverity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .packageIssue(
                packageIssue.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .type(type?.applyValue({ args0 -> args0 }))
            .vexAssessment(vexAssessment?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [VulnerabilityOccurrenceArgs].
 */
@PulumiTagMarker
public class VulnerabilityOccurrenceArgsBuilder internal constructor() {
    private var cvssV2: Output? = null

    private var cvssv3: Output? = null

    private var effectiveSeverity: Output? = null

    private var packageIssue: Output>? = null

    private var type: Output? = null

    private var vexAssessment: Output? = null

    /**
     * @param value The cvss v2 score for the vulnerability.
     */
    @JvmName("yrxawkhpjiqoqyeq")
    public suspend fun cvssV2(`value`: Output) {
        this.cvssV2 = value
    }

    /**
     * @param value The cvss v3 score for the vulnerability.
     */
    @JvmName("bwakjlbvswohprej")
    public suspend fun cvssv3(`value`: Output) {
        this.cvssv3 = value
    }

    /**
     * @param value The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues.
     */
    @JvmName("frhxpydrokulerir")
    public suspend fun effectiveSeverity(`value`: Output) {
        this.effectiveSeverity = value
    }

    /**
     * @param value The set of affected locations and their fixes (if available) within the associated resource.
     */
    @JvmName("qvefgnnicdxkmdnl")
    public suspend fun packageIssue(`value`: Output>) {
        this.packageIssue = value
    }

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

    /**
     * @param values The set of affected locations and their fixes (if available) within the associated resource.
     */
    @JvmName("chndexnviqcpjggi")
    public suspend fun packageIssue(values: List>) {
        this.packageIssue = Output.all(values)
    }

    /**
     * @param value The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).
     */
    @JvmName("ctjaajgchucvpbag")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value
     */
    @JvmName("hcabwcrpbkdxoiov")
    public suspend fun vexAssessment(`value`: Output) {
        this.vexAssessment = value
    }

    /**
     * @param value The cvss v2 score for the vulnerability.
     */
    @JvmName("fsvisuaubpbtvyse")
    public suspend fun cvssV2(`value`: CVSSArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cvssV2 = mapped
    }

    /**
     * @param argument The cvss v2 score for the vulnerability.
     */
    @JvmName("kqkunkhfupbblwyv")
    public suspend fun cvssV2(argument: suspend CVSSArgsBuilder.() -> Unit) {
        val toBeMapped = CVSSArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.cvssV2 = mapped
    }

    /**
     * @param value The cvss v3 score for the vulnerability.
     */
    @JvmName("sycdoftegsplecov")
    public suspend fun cvssv3(`value`: CVSSArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cvssv3 = mapped
    }

    /**
     * @param argument The cvss v3 score for the vulnerability.
     */
    @JvmName("kcxfqvvhaoewetvt")
    public suspend fun cvssv3(argument: suspend CVSSArgsBuilder.() -> Unit) {
        val toBeMapped = CVSSArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.cvssv3 = mapped
    }

    /**
     * @param value The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues.
     */
    @JvmName("vfmpblmtcdbjjgub")
    public suspend fun effectiveSeverity(`value`: VulnerabilityOccurrenceEffectiveSeverity?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.effectiveSeverity = mapped
    }

    /**
     * @param value The set of affected locations and their fixes (if available) within the associated resource.
     */
    @JvmName("dkhuuurvuompvyvh")
    public suspend fun packageIssue(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.packageIssue = mapped
    }

    /**
     * @param argument The set of affected locations and their fixes (if available) within the associated resource.
     */
    @JvmName("jdsqexxusyxrfgov")
    public suspend fun packageIssue(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PackageIssueArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.packageIssue = mapped
    }

    /**
     * @param argument The set of affected locations and their fixes (if available) within the associated resource.
     */
    @JvmName("lqfshxqvdvwaekix")
    public suspend fun packageIssue(vararg argument: suspend PackageIssueArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PackageIssueArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.packageIssue = mapped
    }

    /**
     * @param argument The set of affected locations and their fixes (if available) within the associated resource.
     */
    @JvmName("uocnwtbmxiusmnkc")
    public suspend fun packageIssue(argument: suspend PackageIssueArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(PackageIssueArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.packageIssue = mapped
    }

    /**
     * @param values The set of affected locations and their fixes (if available) within the associated resource.
     */
    @JvmName("gvajjalxwvytrmad")
    public suspend fun packageIssue(vararg values: PackageIssueArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.packageIssue = mapped
    }

    /**
     * @param value The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).
     */
    @JvmName("mxtcnpgfcjsauvcj")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value
     */
    @JvmName("bvnawqlihtsfabrf")
    public suspend fun vexAssessment(`value`: VexAssessmentArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vexAssessment = mapped
    }

    /**
     * @param argument
     */
    @JvmName("rssbmtpluucwavar")
    public suspend fun vexAssessment(argument: suspend VexAssessmentArgsBuilder.() -> Unit) {
        val toBeMapped = VexAssessmentArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.vexAssessment = mapped
    }

    internal fun build(): VulnerabilityOccurrenceArgs = VulnerabilityOccurrenceArgs(
        cvssV2 = cvssV2,
        cvssv3 = cvssv3,
        effectiveSeverity = effectiveSeverity,
        packageIssue = packageIssue ?: throw PulumiNullFieldException("packageIssue"),
        type = type,
        vexAssessment = vexAssessment,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy