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

com.pulumi.awsnative.iotsitewise.kotlin.Dashboard.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.iotsitewise.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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 kotlin.collections.List

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

    public var args: DashboardArgs = DashboardArgs()

    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 DashboardArgsBuilder.() -> Unit) {
        val builder = DashboardArgsBuilder()
        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(): Dashboard {
        val builtJavaResource = com.pulumi.awsnative.iotsitewise.Dashboard(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Dashboard(builtJavaResource)
    }
}

/**
 * Resource schema for AWS::IoTSiteWise::Dashboard
 */
public class Dashboard internal constructor(
    override val javaResource: com.pulumi.awsnative.iotsitewise.Dashboard,
) : KotlinCustomResource(javaResource, DashboardMapper) {
    /**
     * The ARN of the dashboard.
     */
    public val dashboardArn: Output
        get() = javaResource.dashboardArn().applyValue({ args0 -> args0 })

    /**
     * The dashboard definition specified in a JSON literal.
     */
    public val dashboardDefinition: Output
        get() = javaResource.dashboardDefinition().applyValue({ args0 -> args0 })

    /**
     * A description for the dashboard.
     */
    public val dashboardDescription: Output
        get() = javaResource.dashboardDescription().applyValue({ args0 -> args0 })

    /**
     * The ID of the dashboard.
     */
    public val dashboardId: Output
        get() = javaResource.dashboardId().applyValue({ args0 -> args0 })

    /**
     * A friendly name for the dashboard.
     */
    public val dashboardName: Output
        get() = javaResource.dashboardName().applyValue({ args0 -> args0 })

    /**
     * The ID of the project in which to create the dashboard.
     */
    public val projectId: Output?
        get() = javaResource.projectId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * A list of key-value pairs that contain metadata for the dashboard.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object DashboardMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.iotsitewise.Dashboard::class == javaResource::class

    override fun map(javaResource: Resource): Dashboard = Dashboard(
        javaResource as
            com.pulumi.awsnative.iotsitewise.Dashboard,
    )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy