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

com.pulumi.azure.hpc.kotlin.inputs.CacheDefaultAccessPolicyArgs.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.hpc.kotlin.inputs

import com.pulumi.azure.hpc.inputs.CacheDefaultAccessPolicyArgs.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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property accessRules One or more `access_rule` blocks (up to three) as defined above.
 */
public data class CacheDefaultAccessPolicyArgs(
    public val accessRules: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.hpc.inputs.CacheDefaultAccessPolicyArgs =
        com.pulumi.azure.hpc.inputs.CacheDefaultAccessPolicyArgs.builder()
            .accessRules(
                accessRules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    /**
     * @param value One or more `access_rule` blocks (up to three) as defined above.
     */
    @JvmName("bldxgwutfcooqyqn")
    public suspend fun accessRules(`value`: Output>) {
        this.accessRules = value
    }

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

    /**
     * @param values One or more `access_rule` blocks (up to three) as defined above.
     */
    @JvmName("cspkmxrxjurnsijt")
    public suspend fun accessRules(values: List>) {
        this.accessRules = Output.all(values)
    }

    /**
     * @param value One or more `access_rule` blocks (up to three) as defined above.
     */
    @JvmName("gmsvomuqprphbfli")
    public suspend fun accessRules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accessRules = mapped
    }

    /**
     * @param argument One or more `access_rule` blocks (up to three) as defined above.
     */
    @JvmName("gtsehnxwcvwclatn")
    public suspend fun accessRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CacheDefaultAccessPolicyAccessRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.accessRules = mapped
    }

    /**
     * @param argument One or more `access_rule` blocks (up to three) as defined above.
     */
    @JvmName("uxlwmweewrwddaja")
    public suspend fun accessRules(vararg argument: suspend CacheDefaultAccessPolicyAccessRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CacheDefaultAccessPolicyAccessRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.accessRules = mapped
    }

    /**
     * @param argument One or more `access_rule` blocks (up to three) as defined above.
     */
    @JvmName("cumwhifhlrjlnrpj")
    public suspend fun accessRules(argument: suspend CacheDefaultAccessPolicyAccessRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CacheDefaultAccessPolicyAccessRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.accessRules = mapped
    }

    /**
     * @param values One or more `access_rule` blocks (up to three) as defined above.
     */
    @JvmName("bljobcsnfehtuklr")
    public suspend fun accessRules(vararg values: CacheDefaultAccessPolicyAccessRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accessRules = mapped
    }

    internal fun build(): CacheDefaultAccessPolicyArgs = CacheDefaultAccessPolicyArgs(
        accessRules = accessRules ?: throw PulumiNullFieldException("accessRules"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy