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

com.pulumi.awsnative.quicksight.kotlin.Topic.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.quicksight.kotlin

import com.pulumi.awsnative.quicksight.kotlin.enums.TopicUserExperienceVersion
import com.pulumi.awsnative.quicksight.kotlin.outputs.TopicDatasetMetadata
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
import com.pulumi.awsnative.quicksight.kotlin.enums.TopicUserExperienceVersion.Companion.toKotlin as topicUserExperienceVersionToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.TopicDatasetMetadata.Companion.toKotlin as topicDatasetMetadataToKotlin

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

    public var args: TopicArgs = TopicArgs()

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

/**
 * Definition of the AWS::QuickSight::Topic Resource Type.
 */
public class Topic internal constructor(
    override val javaResource: com.pulumi.awsnative.quicksight.Topic,
) : KotlinCustomResource(javaResource, TopicMapper) {
    /**
     * The Amazon Resource Name (ARN) of the topic.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The ID of the AWS account that you want to create a topic in.
     */
    public val awsAccountId: Output?
        get() = javaResource.awsAccountId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The data sets that the topic is associated with.
     */
    public val dataSets: Output>?
        get() = javaResource.dataSets().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> topicDatasetMetadataToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The description of the topic.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the topic.
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The ID for the topic. This ID is unique per AWS Region for each AWS account.
     */
    public val topicId: Output?
        get() = javaResource.topicId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The user experience version of the topic.
     */
    public val userExperienceVersion: Output?
        get() = javaResource.userExperienceVersion().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> topicUserExperienceVersionToKotlin(args0) })
            }).orElse(null)
        })
}

public object TopicMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.quicksight.Topic::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy