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

com.pulumi.azurenative.containerregistry.kotlin.inputs.IPRuleArgs.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.containerregistry.kotlin.inputs

import com.pulumi.azurenative.containerregistry.inputs.IPRuleArgs.builder
import com.pulumi.azurenative.containerregistry.kotlin.enums.Action
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 kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * IP rule with specific IP or IP range in CIDR format.
 * @property action The action of IP ACL rule.
 * @property iPAddressOrRange Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
 */
public data class IPRuleArgs(
    public val action: Output>? = null,
    public val iPAddressOrRange: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.containerregistry.inputs.IPRuleArgs =
        com.pulumi.azurenative.containerregistry.inputs.IPRuleArgs.builder()
            .action(
                action?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .iPAddressOrRange(iPAddressOrRange.applyValue({ args0 -> args0 })).build()
}

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

    private var iPAddressOrRange: Output? = null

    /**
     * @param value The action of IP ACL rule.
     */
    @JvmName("qcxsmpdtygrtlmga")
    public suspend fun action(`value`: Output>) {
        this.action = value
    }

    /**
     * @param value Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
     */
    @JvmName("mbqdrragryisxvxh")
    public suspend fun iPAddressOrRange(`value`: Output) {
        this.iPAddressOrRange = value
    }

    /**
     * @param value The action of IP ACL rule.
     */
    @JvmName("docuaassopcrcpah")
    public suspend fun action(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value The action of IP ACL rule.
     */
    @JvmName("hhntpqpqrfmwbdlm")
    public fun action(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value The action of IP ACL rule.
     */
    @JvmName("hkoumvjalnllwwkh")
    public fun action(`value`: Action) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
     */
    @JvmName("epugshljfkmcqfuh")
    public suspend fun iPAddressOrRange(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.iPAddressOrRange = mapped
    }

    internal fun build(): IPRuleArgs = IPRuleArgs(
        action = action,
        iPAddressOrRange = iPAddressOrRange ?: throw PulumiNullFieldException("iPAddressOrRange"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy