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

com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.ScanConfigArgs.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.websecurityscanner.v1alpha.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.websecurityscanner.v1alpha.ScanConfigArgs.builder
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.enums.ScanConfigTargetPlatformsItem
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.enums.ScanConfigUserAgent
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.inputs.AuthenticationArgs
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.inputs.AuthenticationArgsBuilder
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.inputs.ScanRunArgs
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.inputs.ScanRunArgsBuilder
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.inputs.ScheduleArgs
import com.pulumi.googlenative.websecurityscanner.v1alpha.kotlin.inputs.ScheduleArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Creates a new ScanConfig.
 * @property authentication The authentication configuration. If specified, service will use the authentication configuration during scanning.
 * @property blacklistPatterns The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
 * @property displayName The user provided display name of the ScanConfig.
 * @property latestRun Latest ScanRun if available.
 * @property maxQps The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.
 * @property name The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.
 * @property project
 * @property schedule The schedule of the ScanConfig.
 * @property startingUrls The starting URLs from which the scanner finds site pages.
 * @property targetPlatforms Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
 * @property userAgent The user agent used during scanning.
 */
public data class ScanConfigArgs(
    public val authentication: Output? = null,
    public val blacklistPatterns: Output>? = null,
    public val displayName: Output? = null,
    public val latestRun: Output? = null,
    public val maxQps: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val schedule: Output? = null,
    public val startingUrls: Output>? = null,
    public val targetPlatforms: Output>? = null,
    public val userAgent: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.websecurityscanner.v1alpha.ScanConfigArgs =
        com.pulumi.googlenative.websecurityscanner.v1alpha.ScanConfigArgs.builder()
            .authentication(authentication?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .blacklistPatterns(blacklistPatterns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .latestRun(latestRun?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .maxQps(maxQps?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .schedule(schedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .startingUrls(startingUrls?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .targetPlatforms(
                targetPlatforms?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .userAgent(userAgent?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ScanConfigArgs].
 */
@PulumiTagMarker
public class ScanConfigArgsBuilder internal constructor() {
    private var authentication: Output? = null

    private var blacklistPatterns: Output>? = null

    private var displayName: Output? = null

    private var latestRun: Output? = null

    private var maxQps: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var schedule: Output? = null

    private var startingUrls: Output>? = null

    private var targetPlatforms: Output>? = null

    private var userAgent: Output? = null

    /**
     * @param value The authentication configuration. If specified, service will use the authentication configuration during scanning.
     */
    @JvmName("jupdrudmohkqopig")
    public suspend fun authentication(`value`: Output) {
        this.authentication = value
    }

    /**
     * @param value The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("mxwyxqvchsibxosq")
    public suspend fun blacklistPatterns(`value`: Output>) {
        this.blacklistPatterns = value
    }

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

    /**
     * @param values The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("uqkpfonrilhmvsxx")
    public suspend fun blacklistPatterns(values: List>) {
        this.blacklistPatterns = Output.all(values)
    }

    /**
     * @param value The user provided display name of the ScanConfig.
     */
    @JvmName("drqgnoudknudcwrb")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Latest ScanRun if available.
     */
    @JvmName("kyfprmdparjrnssc")
    public suspend fun latestRun(`value`: Output) {
        this.latestRun = value
    }

    /**
     * @param value The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.
     */
    @JvmName("axkyihjqaplgmyrn")
    public suspend fun maxQps(`value`: Output) {
        this.maxQps = value
    }

    /**
     * @param value The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.
     */
    @JvmName("nuyckddbkfnhrkwd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value The schedule of the ScanConfig.
     */
    @JvmName("mqutgsqwnquqxtjv")
    public suspend fun schedule(`value`: Output) {
        this.schedule = value
    }

    /**
     * @param value The starting URLs from which the scanner finds site pages.
     */
    @JvmName("ahodjttvkwnvbpfd")
    public suspend fun startingUrls(`value`: Output>) {
        this.startingUrls = value
    }

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

    /**
     * @param values The starting URLs from which the scanner finds site pages.
     */
    @JvmName("odwmddnunxvxvixf")
    public suspend fun startingUrls(values: List>) {
        this.startingUrls = Output.all(values)
    }

    /**
     * @param value Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
     */
    @JvmName("gdcrkrpqiabqtytb")
    public suspend fun targetPlatforms(`value`: Output>) {
        this.targetPlatforms = value
    }

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

    /**
     * @param values Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
     */
    @JvmName("xhuxgxnbpvprewwy")
    public suspend fun targetPlatforms(values: List>) {
        this.targetPlatforms = Output.all(values)
    }

    /**
     * @param value The user agent used during scanning.
     */
    @JvmName("wfmuclookyqyhrtx")
    public suspend fun userAgent(`value`: Output) {
        this.userAgent = value
    }

    /**
     * @param value The authentication configuration. If specified, service will use the authentication configuration during scanning.
     */
    @JvmName("bgeqxplhfckfivua")
    public suspend fun authentication(`value`: AuthenticationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authentication = mapped
    }

    /**
     * @param argument The authentication configuration. If specified, service will use the authentication configuration during scanning.
     */
    @JvmName("yutwkjmyttkjkofm")
    public suspend fun authentication(argument: suspend AuthenticationArgsBuilder.() -> Unit) {
        val toBeMapped = AuthenticationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.authentication = mapped
    }

    /**
     * @param value The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("myjdaiohgiqnrbgw")
    public suspend fun blacklistPatterns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blacklistPatterns = mapped
    }

    /**
     * @param values The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("iajeikgqjujkkibt")
    public suspend fun blacklistPatterns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.blacklistPatterns = mapped
    }

    /**
     * @param value The user provided display name of the ScanConfig.
     */
    @JvmName("ungdpysqflpasobi")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Latest ScanRun if available.
     */
    @JvmName("mblbcbpcovuayusp")
    public suspend fun latestRun(`value`: ScanRunArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.latestRun = mapped
    }

    /**
     * @param argument Latest ScanRun if available.
     */
    @JvmName("hxqgedafkpfnalst")
    public suspend fun latestRun(argument: suspend ScanRunArgsBuilder.() -> Unit) {
        val toBeMapped = ScanRunArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.latestRun = mapped
    }

    /**
     * @param value The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.
     */
    @JvmName("uthivowmbthgoewj")
    public suspend fun maxQps(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxQps = mapped
    }

    /**
     * @param value The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.
     */
    @JvmName("bfxbvigvnmjafmpv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

    /**
     * @param value The schedule of the ScanConfig.
     */
    @JvmName("akcqopgjwrqndcir")
    public suspend fun schedule(`value`: ScheduleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedule = mapped
    }

    /**
     * @param argument The schedule of the ScanConfig.
     */
    @JvmName("iimfyncrqcnqvxke")
    public suspend fun schedule(argument: suspend ScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = ScheduleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.schedule = mapped
    }

    /**
     * @param value The starting URLs from which the scanner finds site pages.
     */
    @JvmName("vcyblyeqtqvmsfew")
    public suspend fun startingUrls(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startingUrls = mapped
    }

    /**
     * @param values The starting URLs from which the scanner finds site pages.
     */
    @JvmName("vtwmemyevrapwwej")
    public suspend fun startingUrls(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startingUrls = mapped
    }

    /**
     * @param value Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
     */
    @JvmName("gjyyjcqyclxebmua")
    public suspend fun targetPlatforms(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetPlatforms = mapped
    }

    /**
     * @param values Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
     */
    @JvmName("rlvmjyjftdpnfmvh")
    public suspend fun targetPlatforms(vararg values: ScanConfigTargetPlatformsItem) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetPlatforms = mapped
    }

    /**
     * @param value The user agent used during scanning.
     */
    @JvmName("byailrpmryftvisi")
    public suspend fun userAgent(`value`: ScanConfigUserAgent?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userAgent = mapped
    }

    internal fun build(): ScanConfigArgs = ScanConfigArgs(
        authentication = authentication,
        blacklistPatterns = blacklistPatterns,
        displayName = displayName,
        latestRun = latestRun,
        maxQps = maxQps,
        name = name,
        project = project,
        schedule = schedule,
        startingUrls = startingUrls,
        targetPlatforms = targetPlatforms,
        userAgent = userAgent,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy