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

com.pulumi.kubernetes.auditregistration.v1alpha1.kotlin.inputs.PolicyArgs.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.kubernetes.auditregistration.v1alpha1.kotlin.inputs

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.kubernetes.auditregistration.v1alpha1.inputs.PolicyArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Policy defines the configuration of how audit events are logged
 * @property level The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
 * @property stages Stages is a list of stages for which events are created.
 */
public data class PolicyArgs(
    public val level: Output,
    public val stages: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.PolicyArgs =
        com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.PolicyArgs.builder()
            .level(level.applyValue({ args0 -> args0 }))
            .stages(stages?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [PolicyArgs].
 */
@PulumiTagMarker
public class PolicyArgsBuilder internal constructor() {
    private var level: Output? = null

    private var stages: Output>? = null

    /**
     * @param value The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
     */
    @JvmName("clgoqtpkjkjdbxak")
    public suspend fun level(`value`: Output) {
        this.level = value
    }

    /**
     * @param value Stages is a list of stages for which events are created.
     */
    @JvmName("croqqfacoevlmacf")
    public suspend fun stages(`value`: Output>) {
        this.stages = value
    }

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

    /**
     * @param values Stages is a list of stages for which events are created.
     */
    @JvmName("reoamxeampgrjhkt")
    public suspend fun stages(values: List>) {
        this.stages = Output.all(values)
    }

    /**
     * @param value The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required
     */
    @JvmName("iantospdtrfrwphe")
    public suspend fun level(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.level = mapped
    }

    /**
     * @param value Stages is a list of stages for which events are created.
     */
    @JvmName("ijeqdtmupugjlkms")
    public suspend fun stages(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stages = mapped
    }

    /**
     * @param values Stages is a list of stages for which events are created.
     */
    @JvmName("drutmhdvfqtiakxe")
    public suspend fun stages(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stages = mapped
    }

    internal fun build(): PolicyArgs = PolicyArgs(
        level = level ?: throw PulumiNullFieldException("level"),
        stages = stages,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy