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

com.pulumi.azure.storage.kotlin.inputs.ManagementPolicyRuleArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.storage.kotlin.inputs

import com.pulumi.azure.storage.inputs.ManagementPolicyRuleArgs.builder
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

/**
 *
 * @property actions An `actions` block as documented below.
 * @property enabled Boolean to specify whether the rule is enabled.
 * @property filters A `filters` block as documented below.
 * @property name The name of the rule. Rule name is case-sensitive. It must be unique within a policy.
 */
public data class ManagementPolicyRuleArgs(
    public val actions: Output,
    public val enabled: Output,
    public val filters: Output,
    public val name: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.storage.inputs.ManagementPolicyRuleArgs =
        com.pulumi.azure.storage.inputs.ManagementPolicyRuleArgs.builder()
            .actions(actions.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .filters(filters.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ManagementPolicyRuleArgs].
 */
@PulumiTagMarker
public class ManagementPolicyRuleArgsBuilder internal constructor() {
    private var actions: Output? = null

    private var enabled: Output? = null

    private var filters: Output? = null

    private var name: Output? = null

    /**
     * @param value An `actions` block as documented below.
     */
    @JvmName("ylmulsrclscuhfqm")
    public suspend fun actions(`value`: Output) {
        this.actions = value
    }

    /**
     * @param value Boolean to specify whether the rule is enabled.
     */
    @JvmName("rqmrhofkntrgwovx")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value A `filters` block as documented below.
     */
    @JvmName("woinhrgaktwlyneb")
    public suspend fun filters(`value`: Output) {
        this.filters = value
    }

    /**
     * @param value The name of the rule. Rule name is case-sensitive. It must be unique within a policy.
     */
    @JvmName("ucbudivhjeufpqit")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An `actions` block as documented below.
     */
    @JvmName("xcpcbexojpbuexta")
    public suspend fun actions(`value`: ManagementPolicyRuleActionsArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param argument An `actions` block as documented below.
     */
    @JvmName("fjrlwsdxkebhkfxy")
    public suspend fun actions(argument: suspend ManagementPolicyRuleActionsArgsBuilder.() -> Unit) {
        val toBeMapped = ManagementPolicyRuleActionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param value Boolean to specify whether the rule is enabled.
     */
    @JvmName("offcfoomqsmrtubh")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value A `filters` block as documented below.
     */
    @JvmName("oxaugkqdwwvqtsnu")
    public suspend fun filters(`value`: ManagementPolicyRuleFiltersArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.filters = mapped
    }

    /**
     * @param argument A `filters` block as documented below.
     */
    @JvmName("sbjrwphysjwfhqep")
    public suspend fun filters(argument: suspend ManagementPolicyRuleFiltersArgsBuilder.() -> Unit) {
        val toBeMapped = ManagementPolicyRuleFiltersArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.filters = mapped
    }

    /**
     * @param value The name of the rule. Rule name is case-sensitive. It must be unique within a policy.
     */
    @JvmName("chjpbsqenjvyghtt")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): ManagementPolicyRuleArgs = ManagementPolicyRuleArgs(
        actions = actions ?: throw PulumiNullFieldException("actions"),
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        filters = filters ?: throw PulumiNullFieldException("filters"),
        name = name ?: throw PulumiNullFieldException("name"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy