com.pulumi.azurenative.storage.kotlin.inputs.IPRuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.storage.kotlin.inputs
import com.pulumi.azurenative.storage.inputs.IPRuleArgs.builder
import com.pulumi.azurenative.storage.kotlin.enums.Action
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.storage.inputs.IPRuleArgs =
com.pulumi.azurenative.storage.inputs.IPRuleArgs.builder()
.action(action?.applyValue({ 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("whgagodcyhvrdyxm")
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("exjcngemntjanbyi")
public suspend fun iPAddressOrRange(`value`: Output) {
this.iPAddressOrRange = value
}
/**
* @param value The action of IP ACL rule.
*/
@JvmName("cnxbxrlvcrdqgwbl")
public suspend fun action(`value`: Action?) {
val toBeMapped = 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("owevefcengyagjtn")
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"),
)
}