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

com.pulumi.gcp.accesscontextmanager.kotlin.inputs.AccessLevelsAccessLevelBasicConditionArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.accesscontextmanager.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.accesscontextmanager.inputs.AccessLevelsAccessLevelBasicConditionArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property devicePolicy Device specific restrictions, all restrictions must hold for
 * the Condition to be true. If not specified, all devices are
 * allowed.
 * Structure is documented below.
 * @property ipSubnetworks A list of CIDR block IP subnetwork specification. May be IPv4
 * or IPv6.
 * Note that for a CIDR IP address block, the specified IP address
 * portion must be properly truncated (i.e. all the host bits must
 * be zero) or the input is considered malformed. For example,
 * "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
 * for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
 * is not. The originating IP of a request must be in one of the
 * listed subnets in order for this Condition to be true.
 * If empty, all IP addresses are allowed.
 * @property members An allowed list of members (users, service accounts).
 * Using groups is not supported yet.
 * The signed-in user originating the request must be a part of one
 * of the provided members. If not specified, a request may come
 * from any user (logged in/not logged in, not present in any
 * groups, etc.).
 * Formats: `user:{emailid}`, `serviceAccount:{emailid}`
 * @property negate Whether to negate the Condition. If true, the Condition becomes
 * a NAND over its non-empty fields, each field must be false for
 * the Condition overall to be satisfied. Defaults to false.
 * @property regions The request must originate from one of the provided
 * countries/regions.
 * Format: A valid ISO 3166-1 alpha-2 code.
 * @property requiredAccessLevels A list of other access levels defined in the same Policy,
 * referenced by resource name. Referencing an AccessLevel which
 * does not exist is an error. All access levels listed must be
 * granted for the Condition to be true.
 * Format: accessPolicies/{policy_id}/accessLevels/{short_name}
 * @property vpcNetworkSources The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
 * Structure is documented below.
 */
public data class AccessLevelsAccessLevelBasicConditionArgs(
    public val devicePolicy: Output? = null,
    public val ipSubnetworks: Output>? = null,
    public val members: Output>? = null,
    public val negate: Output? = null,
    public val regions: Output>? = null,
    public val requiredAccessLevels: Output>? = null,
    public val vpcNetworkSources: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.accesscontextmanager.inputs.AccessLevelsAccessLevelBasicConditionArgs =
        com.pulumi.gcp.accesscontextmanager.inputs.AccessLevelsAccessLevelBasicConditionArgs.builder()
            .devicePolicy(devicePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ipSubnetworks(ipSubnetworks?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .members(members?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .negate(negate?.applyValue({ args0 -> args0 }))
            .regions(regions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .requiredAccessLevels(requiredAccessLevels?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .vpcNetworkSources(
                vpcNetworkSources?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AccessLevelsAccessLevelBasicConditionArgs].
 */
@PulumiTagMarker
public class AccessLevelsAccessLevelBasicConditionArgsBuilder internal constructor() {
    private var devicePolicy: Output? = null

    private var ipSubnetworks: Output>? = null

    private var members: Output>? = null

    private var negate: Output? = null

    private var regions: Output>? = null

    private var requiredAccessLevels: Output>? = null

    private var vpcNetworkSources:
        Output>? = null

    /**
     * @param value Device specific restrictions, all restrictions must hold for
     * the Condition to be true. If not specified, all devices are
     * allowed.
     * Structure is documented below.
     */
    @JvmName("xmhrcyykjhrivnks")
    public suspend fun devicePolicy(`value`: Output) {
        this.devicePolicy = value
    }

    /**
     * @param value A list of CIDR block IP subnetwork specification. May be IPv4
     * or IPv6.
     * Note that for a CIDR IP address block, the specified IP address
     * portion must be properly truncated (i.e. all the host bits must
     * be zero) or the input is considered malformed. For example,
     * "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
     * for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
     * is not. The originating IP of a request must be in one of the
     * listed subnets in order for this Condition to be true.
     * If empty, all IP addresses are allowed.
     */
    @JvmName("jusgtpirxhgislsb")
    public suspend fun ipSubnetworks(`value`: Output>) {
        this.ipSubnetworks = value
    }

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

    /**
     * @param values A list of CIDR block IP subnetwork specification. May be IPv4
     * or IPv6.
     * Note that for a CIDR IP address block, the specified IP address
     * portion must be properly truncated (i.e. all the host bits must
     * be zero) or the input is considered malformed. For example,
     * "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
     * for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
     * is not. The originating IP of a request must be in one of the
     * listed subnets in order for this Condition to be true.
     * If empty, all IP addresses are allowed.
     */
    @JvmName("pumqcptishjlckgf")
    public suspend fun ipSubnetworks(values: List>) {
        this.ipSubnetworks = Output.all(values)
    }

    /**
     * @param value An allowed list of members (users, service accounts).
     * Using groups is not supported yet.
     * The signed-in user originating the request must be a part of one
     * of the provided members. If not specified, a request may come
     * from any user (logged in/not logged in, not present in any
     * groups, etc.).
     * Formats: `user:{emailid}`, `serviceAccount:{emailid}`
     */
    @JvmName("cmdogwyuqkvwnyel")
    public suspend fun members(`value`: Output>) {
        this.members = value
    }

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

    /**
     * @param values An allowed list of members (users, service accounts).
     * Using groups is not supported yet.
     * The signed-in user originating the request must be a part of one
     * of the provided members. If not specified, a request may come
     * from any user (logged in/not logged in, not present in any
     * groups, etc.).
     * Formats: `user:{emailid}`, `serviceAccount:{emailid}`
     */
    @JvmName("lyhhgogsnblhnoek")
    public suspend fun members(values: List>) {
        this.members = Output.all(values)
    }

    /**
     * @param value Whether to negate the Condition. If true, the Condition becomes
     * a NAND over its non-empty fields, each field must be false for
     * the Condition overall to be satisfied. Defaults to false.
     */
    @JvmName("jhegvuexiujrbkqb")
    public suspend fun negate(`value`: Output) {
        this.negate = value
    }

    /**
     * @param value The request must originate from one of the provided
     * countries/regions.
     * Format: A valid ISO 3166-1 alpha-2 code.
     */
    @JvmName("xhupfshyxyjmpeak")
    public suspend fun regions(`value`: Output>) {
        this.regions = value
    }

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

    /**
     * @param values The request must originate from one of the provided
     * countries/regions.
     * Format: A valid ISO 3166-1 alpha-2 code.
     */
    @JvmName("gmdwvswykpyuwttu")
    public suspend fun regions(values: List>) {
        this.regions = Output.all(values)
    }

    /**
     * @param value A list of other access levels defined in the same Policy,
     * referenced by resource name. Referencing an AccessLevel which
     * does not exist is an error. All access levels listed must be
     * granted for the Condition to be true.
     * Format: accessPolicies/{policy_id}/accessLevels/{short_name}
     */
    @JvmName("ewoqojdxesfxghcl")
    public suspend fun requiredAccessLevels(`value`: Output>) {
        this.requiredAccessLevels = value
    }

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

    /**
     * @param values A list of other access levels defined in the same Policy,
     * referenced by resource name. Referencing an AccessLevel which
     * does not exist is an error. All access levels listed must be
     * granted for the Condition to be true.
     * Format: accessPolicies/{policy_id}/accessLevels/{short_name}
     */
    @JvmName("bnlbbhtikustiili")
    public suspend fun requiredAccessLevels(values: List>) {
        this.requiredAccessLevels = Output.all(values)
    }

    /**
     * @param value The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
     * Structure is documented below.
     */
    @JvmName("kghiwtauijpinmlb")
    public suspend fun vpcNetworkSources(`value`: Output>) {
        this.vpcNetworkSources = value
    }

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

    /**
     * @param values The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
     * Structure is documented below.
     */
    @JvmName("tmjwrowjgrmtdcpu")
    public suspend fun vpcNetworkSources(values: List>) {
        this.vpcNetworkSources = Output.all(values)
    }

    /**
     * @param value Device specific restrictions, all restrictions must hold for
     * the Condition to be true. If not specified, all devices are
     * allowed.
     * Structure is documented below.
     */
    @JvmName("xyjybmwhntunwusy")
    public suspend fun devicePolicy(`value`: AccessLevelsAccessLevelBasicConditionDevicePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.devicePolicy = mapped
    }

    /**
     * @param argument Device specific restrictions, all restrictions must hold for
     * the Condition to be true. If not specified, all devices are
     * allowed.
     * Structure is documented below.
     */
    @JvmName("oggxmeuaavernorm")
    public suspend fun devicePolicy(argument: suspend AccessLevelsAccessLevelBasicConditionDevicePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = AccessLevelsAccessLevelBasicConditionDevicePolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.devicePolicy = mapped
    }

    /**
     * @param value A list of CIDR block IP subnetwork specification. May be IPv4
     * or IPv6.
     * Note that for a CIDR IP address block, the specified IP address
     * portion must be properly truncated (i.e. all the host bits must
     * be zero) or the input is considered malformed. For example,
     * "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
     * for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
     * is not. The originating IP of a request must be in one of the
     * listed subnets in order for this Condition to be true.
     * If empty, all IP addresses are allowed.
     */
    @JvmName("eqbkdhnhpmgmadwl")
    public suspend fun ipSubnetworks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipSubnetworks = mapped
    }

    /**
     * @param values A list of CIDR block IP subnetwork specification. May be IPv4
     * or IPv6.
     * Note that for a CIDR IP address block, the specified IP address
     * portion must be properly truncated (i.e. all the host bits must
     * be zero) or the input is considered malformed. For example,
     * "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
     * for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
     * is not. The originating IP of a request must be in one of the
     * listed subnets in order for this Condition to be true.
     * If empty, all IP addresses are allowed.
     */
    @JvmName("eifixklljcoywnjx")
    public suspend fun ipSubnetworks(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipSubnetworks = mapped
    }

    /**
     * @param value An allowed list of members (users, service accounts).
     * Using groups is not supported yet.
     * The signed-in user originating the request must be a part of one
     * of the provided members. If not specified, a request may come
     * from any user (logged in/not logged in, not present in any
     * groups, etc.).
     * Formats: `user:{emailid}`, `serviceAccount:{emailid}`
     */
    @JvmName("bobourbkmhmkvmir")
    public suspend fun members(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.members = mapped
    }

    /**
     * @param values An allowed list of members (users, service accounts).
     * Using groups is not supported yet.
     * The signed-in user originating the request must be a part of one
     * of the provided members. If not specified, a request may come
     * from any user (logged in/not logged in, not present in any
     * groups, etc.).
     * Formats: `user:{emailid}`, `serviceAccount:{emailid}`
     */
    @JvmName("derflpxcikrhnwln")
    public suspend fun members(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.members = mapped
    }

    /**
     * @param value Whether to negate the Condition. If true, the Condition becomes
     * a NAND over its non-empty fields, each field must be false for
     * the Condition overall to be satisfied. Defaults to false.
     */
    @JvmName("ccxnkeqjdetqlnvs")
    public suspend fun negate(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.negate = mapped
    }

    /**
     * @param value The request must originate from one of the provided
     * countries/regions.
     * Format: A valid ISO 3166-1 alpha-2 code.
     */
    @JvmName("rokftsifvvifgmgo")
    public suspend fun regions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regions = mapped
    }

    /**
     * @param values The request must originate from one of the provided
     * countries/regions.
     * Format: A valid ISO 3166-1 alpha-2 code.
     */
    @JvmName("qsedkwdhtbcnhmsg")
    public suspend fun regions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.regions = mapped
    }

    /**
     * @param value A list of other access levels defined in the same Policy,
     * referenced by resource name. Referencing an AccessLevel which
     * does not exist is an error. All access levels listed must be
     * granted for the Condition to be true.
     * Format: accessPolicies/{policy_id}/accessLevels/{short_name}
     */
    @JvmName("nigctliuwhxosvey")
    public suspend fun requiredAccessLevels(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requiredAccessLevels = mapped
    }

    /**
     * @param values A list of other access levels defined in the same Policy,
     * referenced by resource name. Referencing an AccessLevel which
     * does not exist is an error. All access levels listed must be
     * granted for the Condition to be true.
     * Format: accessPolicies/{policy_id}/accessLevels/{short_name}
     */
    @JvmName("fiiywcbmkjjtswqb")
    public suspend fun requiredAccessLevels(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requiredAccessLevels = mapped
    }

    /**
     * @param value The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
     * Structure is documented below.
     */
    @JvmName("qqdjrixcrleuijph")
    public suspend fun vpcNetworkSources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcNetworkSources = mapped
    }

    /**
     * @param argument The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
     * Structure is documented below.
     */
    @JvmName("qupdkyaqnmejbbig")
    public suspend fun vpcNetworkSources(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccessLevelsAccessLevelBasicConditionVpcNetworkSourceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.vpcNetworkSources = mapped
    }

    /**
     * @param argument The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
     * Structure is documented below.
     */
    @JvmName("sapstulpyracycvg")
    public suspend fun vpcNetworkSources(vararg argument: suspend AccessLevelsAccessLevelBasicConditionVpcNetworkSourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessLevelsAccessLevelBasicConditionVpcNetworkSourceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.vpcNetworkSources = mapped
    }

    /**
     * @param argument The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
     * Structure is documented below.
     */
    @JvmName("ajfxautseohdduad")
    public suspend fun vpcNetworkSources(argument: suspend AccessLevelsAccessLevelBasicConditionVpcNetworkSourceArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                AccessLevelsAccessLevelBasicConditionVpcNetworkSourceArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.vpcNetworkSources = mapped
    }

    /**
     * @param values The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`.
     * Structure is documented below.
     */
    @JvmName("uumtcdmsbwloscle")
    public suspend fun vpcNetworkSources(vararg values: AccessLevelsAccessLevelBasicConditionVpcNetworkSourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vpcNetworkSources = mapped
    }

    internal fun build(): AccessLevelsAccessLevelBasicConditionArgs =
        AccessLevelsAccessLevelBasicConditionArgs(
            devicePolicy = devicePolicy,
            ipSubnetworks = ipSubnetworks,
            members = members,
            negate = negate,
            regions = regions,
            requiredAccessLevels = requiredAccessLevels,
            vpcNetworkSources = vpcNetworkSources,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy