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

com.pulumi.googlenative.containeranalysis.v1.kotlin.inputs.DiscoveryOccurrenceArgs.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.DiscoveryOccurrenceArgs.builder
import com.pulumi.googlenative.containeranalysis.v1.kotlin.enums.DiscoveryOccurrenceAnalysisStatus
import com.pulumi.googlenative.containeranalysis.v1.kotlin.enums.DiscoveryOccurrenceContinuousAnalysis
import com.pulumi.kotlin.ConvertibleToJava
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

/**
 * Provides information about the analysis status of a discovered resource.
 * @property analysisCompleted
 * @property analysisError Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
 * @property analysisStatus The status of discovery for the resource.
 * @property analysisStatusError When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API.
 * @property continuousAnalysis Whether the resource is continuously analyzed.
 * @property cpe The CPE of the resource being scanned.
 * @property lastScanTime The last time this resource was scanned.
 */
public data class DiscoveryOccurrenceArgs(
    public val analysisCompleted: Output? = null,
    public val analysisError: Output>? = null,
    public val analysisStatus: Output? = null,
    public val analysisStatusError: Output? = null,
    public val continuousAnalysis: Output? = null,
    public val cpe: Output? = null,
    public val lastScanTime: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.containeranalysis.v1.inputs.DiscoveryOccurrenceArgs = com.pulumi.googlenative.containeranalysis.v1.inputs.DiscoveryOccurrenceArgs.builder()
        .analysisCompleted(analysisCompleted?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .analysisError(
            analysisError?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .analysisStatus(analysisStatus?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .analysisStatusError(
            analysisStatusError?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .continuousAnalysis(
            continuousAnalysis?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .cpe(cpe?.applyValue({ args0 -> args0 }))
        .lastScanTime(lastScanTime?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DiscoveryOccurrenceArgs].
 */
@PulumiTagMarker
public class DiscoveryOccurrenceArgsBuilder internal constructor() {
    private var analysisCompleted: Output? = null

    private var analysisError: Output>? = null

    private var analysisStatus: Output? = null

    private var analysisStatusError: Output? = null

    private var continuousAnalysis: Output? = null

    private var cpe: Output? = null

    private var lastScanTime: Output? = null

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

    /**
     * @param value Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
     */
    @JvmName("fogcfgabpmjlqayf")
    public suspend fun analysisError(`value`: Output>) {
        this.analysisError = value
    }

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

    /**
     * @param values Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
     */
    @JvmName("eenagssvhgnmfhpo")
    public suspend fun analysisError(values: List>) {
        this.analysisError = Output.all(values)
    }

    /**
     * @param value The status of discovery for the resource.
     */
    @JvmName("gayuccqqwsnheuqg")
    public suspend fun analysisStatus(`value`: Output) {
        this.analysisStatus = value
    }

    /**
     * @param value When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API.
     */
    @JvmName("jolqbhfukyvujbsp")
    public suspend fun analysisStatusError(`value`: Output) {
        this.analysisStatusError = value
    }

    /**
     * @param value Whether the resource is continuously analyzed.
     */
    @JvmName("ipsnnlclvosftsdw")
    public suspend fun continuousAnalysis(`value`: Output) {
        this.continuousAnalysis = value
    }

    /**
     * @param value The CPE of the resource being scanned.
     */
    @JvmName("qcuijdpootwiffqf")
    public suspend fun cpe(`value`: Output) {
        this.cpe = value
    }

    /**
     * @param value The last time this resource was scanned.
     */
    @JvmName("vgtkdsfdonmabpnf")
    public suspend fun lastScanTime(`value`: Output) {
        this.lastScanTime = value
    }

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

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

    /**
     * @param value Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
     */
    @JvmName("hxceprossvolbpvy")
    public suspend fun analysisError(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.analysisError = mapped
    }

    /**
     * @param argument Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
     */
    @JvmName("fbaixhbkjmhekcrp")
    public suspend fun analysisError(argument: List Unit>) {
        val toBeMapped = argument.toList().map { StatusArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.analysisError = mapped
    }

    /**
     * @param argument Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
     */
    @JvmName("vqiqjtedelpcyvtr")
    public suspend fun analysisError(vararg argument: suspend StatusArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { StatusArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.analysisError = mapped
    }

    /**
     * @param argument Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
     */
    @JvmName("iupvhqukhcgdvrrk")
    public suspend fun analysisError(argument: suspend StatusArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(StatusArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.analysisError = mapped
    }

    /**
     * @param values Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.
     */
    @JvmName("yejbyydouhsfuqhr")
    public suspend fun analysisError(vararg values: StatusArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.analysisError = mapped
    }

    /**
     * @param value The status of discovery for the resource.
     */
    @JvmName("jysmgrwreapmqflj")
    public suspend fun analysisStatus(`value`: DiscoveryOccurrenceAnalysisStatus?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.analysisStatus = mapped
    }

    /**
     * @param value When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API.
     */
    @JvmName("itdwtshhncpfypns")
    public suspend fun analysisStatusError(`value`: StatusArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.analysisStatusError = mapped
    }

    /**
     * @param argument When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API.
     */
    @JvmName("kemgymvncixyifgk")
    public suspend fun analysisStatusError(argument: suspend StatusArgsBuilder.() -> Unit) {
        val toBeMapped = StatusArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.analysisStatusError = mapped
    }

    /**
     * @param value Whether the resource is continuously analyzed.
     */
    @JvmName("owydtusfbphegkpr")
    public suspend fun continuousAnalysis(`value`: DiscoveryOccurrenceContinuousAnalysis?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.continuousAnalysis = mapped
    }

    /**
     * @param value The CPE of the resource being scanned.
     */
    @JvmName("bsrmjewvfigyuckr")
    public suspend fun cpe(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cpe = mapped
    }

    /**
     * @param value The last time this resource was scanned.
     */
    @JvmName("edwkryacnjliecif")
    public suspend fun lastScanTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lastScanTime = mapped
    }

    internal fun build(): DiscoveryOccurrenceArgs = DiscoveryOccurrenceArgs(
        analysisCompleted = analysisCompleted,
        analysisError = analysisError,
        analysisStatus = analysisStatus,
        analysisStatusError = analysisStatusError,
        continuousAnalysis = continuousAnalysis,
        cpe = cpe,
        lastScanTime = lastScanTime,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy