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

com.pulumi.azure.paloalto.kotlin.VirtualNetworkAppliance.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.paloalto.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [VirtualNetworkAppliance].
 */
@PulumiTagMarker
public class VirtualNetworkApplianceResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: VirtualNetworkApplianceArgs = VirtualNetworkApplianceArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend VirtualNetworkApplianceArgsBuilder.() -> Unit) {
        val builder = VirtualNetworkApplianceArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): VirtualNetworkAppliance {
        val builtJavaResource =
            com.pulumi.azure.paloalto.VirtualNetworkAppliance(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return VirtualNetworkAppliance(builtJavaResource)
    }
}

public class VirtualNetworkAppliance internal constructor(
    override val javaResource: com.pulumi.azure.paloalto.VirtualNetworkAppliance,
) : KotlinCustomResource(javaResource, VirtualNetworkApplianceMapper) {
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    public val virtualHubId: Output
        get() = javaResource.virtualHubId().applyValue({ args0 -> args0 })
}

public object VirtualNetworkApplianceMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.paloalto.VirtualNetworkAppliance::class == javaResource::class

    override fun map(javaResource: Resource): VirtualNetworkAppliance =
        VirtualNetworkAppliance(javaResource as com.pulumi.azure.paloalto.VirtualNetworkAppliance)
}

/**
 * @see [VirtualNetworkAppliance].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [VirtualNetworkAppliance].
 */
public suspend fun virtualNetworkAppliance(
    name: String,
    block: suspend VirtualNetworkApplianceResourceBuilder.() -> Unit,
): VirtualNetworkAppliance {
    val builder = VirtualNetworkApplianceResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [VirtualNetworkAppliance].
 * @param name The _unique_ name of the resulting resource.
 */
public fun virtualNetworkAppliance(name: String): VirtualNetworkAppliance {
    val builder = VirtualNetworkApplianceResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy