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

com.pulumi.azure.devcenter.kotlin.Catalog.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.devcenter.kotlin

import com.pulumi.azure.devcenter.kotlin.outputs.CatalogCatalogAdogit
import com.pulumi.azure.devcenter.kotlin.outputs.CatalogCatalogGithub
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
import com.pulumi.azure.devcenter.kotlin.outputs.CatalogCatalogAdogit.Companion.toKotlin as catalogCatalogAdogitToKotlin
import com.pulumi.azure.devcenter.kotlin.outputs.CatalogCatalogGithub.Companion.toKotlin as catalogCatalogGithubToKotlin

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

    public var args: CatalogArgs = CatalogArgs()

    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 CatalogArgsBuilder.() -> Unit) {
        val builder = CatalogArgsBuilder()
        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(): Catalog {
        val builtJavaResource = com.pulumi.azure.devcenter.Catalog(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Catalog(builtJavaResource)
    }
}

public class Catalog internal constructor(
    override val javaResource: com.pulumi.azure.devcenter.Catalog,
) : KotlinCustomResource(javaResource, CatalogMapper) {
    public val catalogAdogit: Output?
        get() = javaResource.catalogAdogit().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> catalogCatalogAdogitToKotlin(args0) })
            }).orElse(null)
        })

    public val catalogGithub: Output?
        get() = javaResource.catalogGithub().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> catalogCatalogGithubToKotlin(args0) })
            }).orElse(null)
        })

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

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

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

public object CatalogMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.devcenter.Catalog::class == javaResource::class

    override fun map(javaResource: Resource): Catalog = Catalog(
        javaResource as
            com.pulumi.azure.devcenter.Catalog,
    )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy