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

com.pulumi.azurenative.batch.kotlin.inputs.EndpointAccessProfileArgs.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.batch.kotlin.inputs

import com.pulumi.azurenative.batch.inputs.EndpointAccessProfileArgs.builder
import com.pulumi.azurenative.batch.kotlin.enums.EndpointAccessDefaultAction
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

/**
 * Network access profile for Batch endpoint.
 * @property defaultAction Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled.
 * @property ipRules Array of IP ranges to filter client IP address.
 */
public data class EndpointAccessProfileArgs(
    public val defaultAction: Output,
    public val ipRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.batch.inputs.EndpointAccessProfileArgs =
        com.pulumi.azurenative.batch.inputs.EndpointAccessProfileArgs.builder()
            .defaultAction(defaultAction.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ipRules(
                ipRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [EndpointAccessProfileArgs].
 */
@PulumiTagMarker
public class EndpointAccessProfileArgsBuilder internal constructor() {
    private var defaultAction: Output? = null

    private var ipRules: Output>? = null

    /**
     * @param value Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled.
     */
    @JvmName("etphfqgqthpxemjn")
    public suspend fun defaultAction(`value`: Output) {
        this.defaultAction = value
    }

    /**
     * @param value Array of IP ranges to filter client IP address.
     */
    @JvmName("cqvkqjdpfihyhgot")
    public suspend fun ipRules(`value`: Output>) {
        this.ipRules = value
    }

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

    /**
     * @param values Array of IP ranges to filter client IP address.
     */
    @JvmName("sgiawfaghhujrhwl")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

    /**
     * @param value Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled.
     */
    @JvmName("sfakpluqtjyojghu")
    public suspend fun defaultAction(`value`: EndpointAccessDefaultAction) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value Array of IP ranges to filter client IP address.
     */
    @JvmName("pjsryqrmoaqmkoxn")
    public suspend fun ipRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param argument Array of IP ranges to filter client IP address.
     */
    @JvmName("eoxqakplyoqotmif")
    public suspend fun ipRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map { IPRuleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument Array of IP ranges to filter client IP address.
     */
    @JvmName("bkoqelfhadffyoys")
    public suspend fun ipRules(vararg argument: suspend IPRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { IPRuleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument Array of IP ranges to filter client IP address.
     */
    @JvmName("rhlhiodirderdfjx")
    public suspend fun ipRules(argument: suspend IPRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(IPRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param values Array of IP ranges to filter client IP address.
     */
    @JvmName("dohsnebfcteojnuh")
    public suspend fun ipRules(vararg values: IPRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    internal fun build(): EndpointAccessProfileArgs = EndpointAccessProfileArgs(
        defaultAction = defaultAction ?: throw PulumiNullFieldException("defaultAction"),
        ipRules = ipRules,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy