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

com.pulumi.gcp.osconfig.kotlin.inputs.OsPolicyAssignmentOsPolicyResourceGroupArgs.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.osconfig.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupArgs.builder
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 inventoryFilters List of inventory filters for the resource
 * group. The resources in this resource group are applied to the target VM if
 * it satisfies at least one of the following inventory filters. For example,
 * to apply this resource group to VMs running either `RHEL` or `CentOS`
 * operating systems, specify 2 items for the list with following values:
 * inventory_filters[0].os_short_name='rhel' and
 * inventory_filters[1].os_short_name='centos' If the list is empty, this
 * resource group will be applied to the target VM unconditionally. Structure
 * is documented below.
 * @property resources List of resources configured for this resource
 * group. The resources are executed in the exact order specified here.
 * Structure is documented below.
 */
public data class OsPolicyAssignmentOsPolicyResourceGroupArgs(
    public val inventoryFilters: Output>? = null,
    public val resources: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupArgs = com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupArgs.builder()
        .inventoryFilters(
            inventoryFilters?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .resources(
            resources.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        ).build()
}

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

    private var resources: Output>? = null

    /**
     * @param value List of inventory filters for the resource
     * group. The resources in this resource group are applied to the target VM if
     * it satisfies at least one of the following inventory filters. For example,
     * to apply this resource group to VMs running either `RHEL` or `CentOS`
     * operating systems, specify 2 items for the list with following values:
     * inventory_filters[0].os_short_name='rhel' and
     * inventory_filters[1].os_short_name='centos' If the list is empty, this
     * resource group will be applied to the target VM unconditionally. Structure
     * is documented below.
     */
    @JvmName("nihgstaslcwsxgga")
    public suspend fun inventoryFilters(`value`: Output>) {
        this.inventoryFilters = value
    }

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

    /**
     * @param values List of inventory filters for the resource
     * group. The resources in this resource group are applied to the target VM if
     * it satisfies at least one of the following inventory filters. For example,
     * to apply this resource group to VMs running either `RHEL` or `CentOS`
     * operating systems, specify 2 items for the list with following values:
     * inventory_filters[0].os_short_name='rhel' and
     * inventory_filters[1].os_short_name='centos' If the list is empty, this
     * resource group will be applied to the target VM unconditionally. Structure
     * is documented below.
     */
    @JvmName("xxalacblalsfnycx")
    public suspend fun inventoryFilters(values: List>) {
        this.inventoryFilters = Output.all(values)
    }

    /**
     * @param value List of resources configured for this resource
     * group. The resources are executed in the exact order specified here.
     * Structure is documented below.
     */
    @JvmName("ukdgqdeedxwkhgry")
    public suspend fun resources(`value`: Output>) {
        this.resources = value
    }

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

    /**
     * @param values List of resources configured for this resource
     * group. The resources are executed in the exact order specified here.
     * Structure is documented below.
     */
    @JvmName("uobcdvhscxdjgygf")
    public suspend fun resources(values: List>) {
        this.resources = Output.all(values)
    }

    /**
     * @param value List of inventory filters for the resource
     * group. The resources in this resource group are applied to the target VM if
     * it satisfies at least one of the following inventory filters. For example,
     * to apply this resource group to VMs running either `RHEL` or `CentOS`
     * operating systems, specify 2 items for the list with following values:
     * inventory_filters[0].os_short_name='rhel' and
     * inventory_filters[1].os_short_name='centos' If the list is empty, this
     * resource group will be applied to the target VM unconditionally. Structure
     * is documented below.
     */
    @JvmName("psoipwaireetaokv")
    public suspend fun inventoryFilters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inventoryFilters = mapped
    }

    /**
     * @param argument List of inventory filters for the resource
     * group. The resources in this resource group are applied to the target VM if
     * it satisfies at least one of the following inventory filters. For example,
     * to apply this resource group to VMs running either `RHEL` or `CentOS`
     * operating systems, specify 2 items for the list with following values:
     * inventory_filters[0].os_short_name='rhel' and
     * inventory_filters[1].os_short_name='centos' If the list is empty, this
     * resource group will be applied to the target VM unconditionally. Structure
     * is documented below.
     */
    @JvmName("prahtijgbclwkhhm")
    public suspend fun inventoryFilters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.inventoryFilters = mapped
    }

    /**
     * @param argument List of inventory filters for the resource
     * group. The resources in this resource group are applied to the target VM if
     * it satisfies at least one of the following inventory filters. For example,
     * to apply this resource group to VMs running either `RHEL` or `CentOS`
     * operating systems, specify 2 items for the list with following values:
     * inventory_filters[0].os_short_name='rhel' and
     * inventory_filters[1].os_short_name='centos' If the list is empty, this
     * resource group will be applied to the target VM unconditionally. Structure
     * is documented below.
     */
    @JvmName("fkajbfhhivcopxro")
    public suspend fun inventoryFilters(vararg argument: suspend OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.inventoryFilters = mapped
    }

    /**
     * @param argument List of inventory filters for the resource
     * group. The resources in this resource group are applied to the target VM if
     * it satisfies at least one of the following inventory filters. For example,
     * to apply this resource group to VMs running either `RHEL` or `CentOS`
     * operating systems, specify 2 items for the list with following values:
     * inventory_filters[0].os_short_name='rhel' and
     * inventory_filters[1].os_short_name='centos' If the list is empty, this
     * resource group will be applied to the target VM unconditionally. Structure
     * is documented below.
     */
    @JvmName("ytldpqjodatqvkoy")
    public suspend fun inventoryFilters(argument: suspend OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.inventoryFilters = mapped
    }

    /**
     * @param values List of inventory filters for the resource
     * group. The resources in this resource group are applied to the target VM if
     * it satisfies at least one of the following inventory filters. For example,
     * to apply this resource group to VMs running either `RHEL` or `CentOS`
     * operating systems, specify 2 items for the list with following values:
     * inventory_filters[0].os_short_name='rhel' and
     * inventory_filters[1].os_short_name='centos' If the list is empty, this
     * resource group will be applied to the target VM unconditionally. Structure
     * is documented below.
     */
    @JvmName("saxnackoirsniprt")
    public suspend fun inventoryFilters(vararg values: OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inventoryFilters = mapped
    }

    /**
     * @param value List of resources configured for this resource
     * group. The resources are executed in the exact order specified here.
     * Structure is documented below.
     */
    @JvmName("vadkiynilkstmgsj")
    public suspend fun resources(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param argument List of resources configured for this resource
     * group. The resources are executed in the exact order specified here.
     * Structure is documented below.
     */
    @JvmName("hgpolymcgfloopqg")
    public suspend fun resources(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            OsPolicyAssignmentOsPolicyResourceGroupResourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    /**
     * @param argument List of resources configured for this resource
     * group. The resources are executed in the exact order specified here.
     * Structure is documented below.
     */
    @JvmName("noelfhsfblqibeti")
    public suspend fun resources(vararg argument: suspend OsPolicyAssignmentOsPolicyResourceGroupResourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            OsPolicyAssignmentOsPolicyResourceGroupResourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    /**
     * @param argument List of resources configured for this resource
     * group. The resources are executed in the exact order specified here.
     * Structure is documented below.
     */
    @JvmName("bjxjnfeypjtvyxwy")
    public suspend fun resources(argument: suspend OsPolicyAssignmentOsPolicyResourceGroupResourceArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                OsPolicyAssignmentOsPolicyResourceGroupResourceArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    /**
     * @param values List of resources configured for this resource
     * group. The resources are executed in the exact order specified here.
     * Structure is documented below.
     */
    @JvmName("couimngxkrhqkudt")
    public suspend fun resources(vararg values: OsPolicyAssignmentOsPolicyResourceGroupResourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    internal fun build(): OsPolicyAssignmentOsPolicyResourceGroupArgs =
        OsPolicyAssignmentOsPolicyResourceGroupArgs(
            inventoryFilters = inventoryFilters,
            resources = resources ?: throw PulumiNullFieldException("resources"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy