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

com.pulumi.azurenative.aadiam.kotlin.inputs.LogSettingsArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.aadiam.kotlin.inputs

import com.pulumi.azurenative.aadiam.inputs.LogSettingsArgs.builder
import com.pulumi.azurenative.aadiam.kotlin.enums.Category
import com.pulumi.core.Either
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
 * @property category Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
 * @property enabled A value indicating whether this log is enabled.
 * @property retentionPolicy The retention policy for this log.
 */
public data class LogSettingsArgs(
    public val category: Output>? = null,
    public val enabled: Output,
    public val retentionPolicy: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.aadiam.inputs.LogSettingsArgs =
        com.pulumi.azurenative.aadiam.inputs.LogSettingsArgs.builder()
            .category(
                category?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .retentionPolicy(
                retentionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [LogSettingsArgs].
 */
@PulumiTagMarker
public class LogSettingsArgsBuilder internal constructor() {
    private var category: Output>? = null

    private var enabled: Output? = null

    private var retentionPolicy: Output? = null

    /**
     * @param value Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("xgqeenoksrbbrenl")
    public suspend fun category(`value`: Output>) {
        this.category = value
    }

    /**
     * @param value A value indicating whether this log is enabled.
     */
    @JvmName("vcgixyylidnodrbq")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The retention policy for this log.
     */
    @JvmName("qtkrqnboybxbtwvv")
    public suspend fun retentionPolicy(`value`: Output) {
        this.retentionPolicy = value
    }

    /**
     * @param value Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("itbupbiaxkwkpwja")
    public suspend fun category(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.category = mapped
    }

    /**
     * @param value Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("cgufxcepmgtrwaaw")
    public fun category(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.category = mapped
    }

    /**
     * @param value Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("amchrlivfxjlkphi")
    public fun category(`value`: Category) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.category = mapped
    }

    /**
     * @param value A value indicating whether this log is enabled.
     */
    @JvmName("odhshbkpxywkarep")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The retention policy for this log.
     */
    @JvmName("vxrcdpjvujxbfijq")
    public suspend fun retentionPolicy(`value`: RetentionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param argument The retention policy for this log.
     */
    @JvmName("qlvuahcmisiawdkl")
    public suspend fun retentionPolicy(argument: suspend RetentionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RetentionPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retentionPolicy = mapped
    }

    internal fun build(): LogSettingsArgs = LogSettingsArgs(
        category = category,
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        retentionPolicy = retentionPolicy,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy