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

com.pulumi.azurenative.resources.kotlin.ResourceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.resources.kotlin

import com.pulumi.azurenative.resources.ResourceArgs.builder
import com.pulumi.azurenative.resources.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.resources.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.resources.kotlin.inputs.IdentityArgs
import com.pulumi.azurenative.resources.kotlin.inputs.IdentityArgsBuilder
import com.pulumi.azurenative.resources.kotlin.inputs.PlanArgs
import com.pulumi.azurenative.resources.kotlin.inputs.PlanArgsBuilder
import com.pulumi.azurenative.resources.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.resources.kotlin.inputs.SkuArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource information.
 * Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2019-05-01.
 * Other available API versions: 2015-11-01, 2023-07-01, 2024-03-01, 2024-07-01.
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:resources:Resource myresource1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}
 * ```
 * @property extendedLocation Resource extended location.
 * @property identity The identity of the resource.
 * @property kind The kind of the resource.
 * @property location Resource location
 * @property managedBy ID of the resource that manages this resource.
 * @property parentResourcePath The parent resource identity.
 * @property plan The plan of the resource.
 * @property properties The resource properties.
 * @property resourceGroupName The name of the resource group for the resource. The name is case insensitive.
 * @property resourceName The name of the resource to create.
 * @property resourceProviderNamespace The namespace of the resource provider.
 * @property resourceType The resource type of the resource to create.
 * @property sku The SKU of the resource.
 * @property tags Resource tags
 */
public data class ResourceArgs(
    public val extendedLocation: Output? = null,
    public val identity: Output? = null,
    public val kind: Output? = null,
    public val location: Output? = null,
    public val managedBy: Output? = null,
    public val parentResourcePath: Output? = null,
    public val plan: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val resourceName: Output? = null,
    public val resourceProviderNamespace: Output? = null,
    public val resourceType: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.resources.ResourceArgs =
        com.pulumi.azurenative.resources.ResourceArgs.builder()
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .managedBy(managedBy?.applyValue({ args0 -> args0 }))
            .parentResourcePath(parentResourcePath?.applyValue({ args0 -> args0 }))
            .plan(plan?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .properties(properties?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .resourceName(resourceName?.applyValue({ args0 -> args0 }))
            .resourceProviderNamespace(resourceProviderNamespace?.applyValue({ args0 -> args0 }))
            .resourceType(resourceType?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ResourceArgs].
 */
@PulumiTagMarker
public class ResourceArgsBuilder internal constructor() {
    private var extendedLocation: Output? = null

    private var identity: Output? = null

    private var kind: Output? = null

    private var location: Output? = null

    private var managedBy: Output? = null

    private var parentResourcePath: Output? = null

    private var plan: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var resourceName: Output? = null

    private var resourceProviderNamespace: Output? = null

    private var resourceType: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Resource extended location.
     */
    @JvmName("ycsmawxajpujfhvl")
    public suspend fun extendedLocation(`value`: Output) {
        this.extendedLocation = value
    }

    /**
     * @param value The identity of the resource.
     */
    @JvmName("fnseinogpnliajsk")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The kind of the resource.
     */
    @JvmName("bxojrvbkgsfwdirk")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Resource location
     */
    @JvmName("shpbdkquodmaohcd")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value ID of the resource that manages this resource.
     */
    @JvmName("xhfgyvfojqnllotp")
    public suspend fun managedBy(`value`: Output) {
        this.managedBy = value
    }

    /**
     * @param value The parent resource identity.
     */
    @JvmName("knqtrglcgwvnclot")
    public suspend fun parentResourcePath(`value`: Output) {
        this.parentResourcePath = value
    }

    /**
     * @param value The plan of the resource.
     */
    @JvmName("nxnhujvfhyytomux")
    public suspend fun plan(`value`: Output) {
        this.plan = value
    }

    /**
     * @param value The resource properties.
     */
    @JvmName("tiqtjpmlijjfdqmq")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource group for the resource. The name is case insensitive.
     */
    @JvmName("nfegxogstjewhlrc")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the resource to create.
     */
    @JvmName("nyjiaxucxaymiowc")
    public suspend fun resourceName(`value`: Output) {
        this.resourceName = value
    }

    /**
     * @param value The namespace of the resource provider.
     */
    @JvmName("cxpngdicqehsprvg")
    public suspend fun resourceProviderNamespace(`value`: Output) {
        this.resourceProviderNamespace = value
    }

    /**
     * @param value The resource type of the resource to create.
     */
    @JvmName("vkwbyjdcqrvfelpy")
    public suspend fun resourceType(`value`: Output) {
        this.resourceType = value
    }

    /**
     * @param value The SKU of the resource.
     */
    @JvmName("qcdedvhrjeiynnah")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value Resource tags
     */
    @JvmName("klpnmwivxndkubpv")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Resource extended location.
     */
    @JvmName("mmtunqoxultruxdp")
    public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedLocation = mapped
    }

    /**
     * @param argument Resource extended location.
     */
    @JvmName("ljkyxxrvvsxhgbyf")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value The identity of the resource.
     */
    @JvmName("pjpkadoidhmuimub")
    public suspend fun identity(`value`: IdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument The identity of the resource.
     */
    @JvmName("flhhmnoefmbbaqdg")
    public suspend fun identity(argument: suspend IdentityArgsBuilder.() -> Unit) {
        val toBeMapped = IdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The kind of the resource.
     */
    @JvmName("nnlyjdfvvpyykace")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Resource location
     */
    @JvmName("qbjscqpgwtgsuerj")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value ID of the resource that manages this resource.
     */
    @JvmName("cdekyestpjtexgfi")
    public suspend fun managedBy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedBy = mapped
    }

    /**
     * @param value The parent resource identity.
     */
    @JvmName("rkawlghpysycwdxy")
    public suspend fun parentResourcePath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentResourcePath = mapped
    }

    /**
     * @param value The plan of the resource.
     */
    @JvmName("snwpomaumvrpflyy")
    public suspend fun plan(`value`: PlanArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.plan = mapped
    }

    /**
     * @param argument The plan of the resource.
     */
    @JvmName("ktuckfndsvbehrtx")
    public suspend fun plan(argument: suspend PlanArgsBuilder.() -> Unit) {
        val toBeMapped = PlanArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.plan = mapped
    }

    /**
     * @param value The resource properties.
     */
    @JvmName("mpcdhuxaqpqilanl")
    public suspend fun properties(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value The name of the resource group for the resource. The name is case insensitive.
     */
    @JvmName("tgtjyynypgatmvnm")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The name of the resource to create.
     */
    @JvmName("eoxdbonbrsnljavy")
    public suspend fun resourceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceName = mapped
    }

    /**
     * @param value The namespace of the resource provider.
     */
    @JvmName("edfqsbvyowlaumfv")
    public suspend fun resourceProviderNamespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceProviderNamespace = mapped
    }

    /**
     * @param value The resource type of the resource to create.
     */
    @JvmName("hkbgdbhfslsakkjg")
    public suspend fun resourceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceType = mapped
    }

    /**
     * @param value The SKU of the resource.
     */
    @JvmName("kucvyonghgabmrtn")
    public suspend fun sku(`value`: SkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument The SKU of the resource.
     */
    @JvmName("jpintyimpmrxrdkm")
    public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
        val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

    /**
     * @param value Resource tags
     */
    @JvmName("ervlqdehynltprto")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags
     */
    @JvmName("neeqcnvclfqifltn")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ResourceArgs = ResourceArgs(
        extendedLocation = extendedLocation,
        identity = identity,
        kind = kind,
        location = location,
        managedBy = managedBy,
        parentResourcePath = parentResourcePath,
        plan = plan,
        properties = properties,
        resourceGroupName = resourceGroupName,
        resourceName = resourceName,
        resourceProviderNamespace = resourceProviderNamespace,
        resourceType = resourceType,
        sku = sku,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy