com.pulumi.awsnative.quicksight.kotlin.Theme.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.quicksight.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.quicksight.kotlin.enums.ThemeType
import com.pulumi.awsnative.quicksight.kotlin.outputs.ThemeConfiguration
import com.pulumi.awsnative.quicksight.kotlin.outputs.ThemeResourcePermission
import com.pulumi.awsnative.quicksight.kotlin.outputs.ThemeVersion
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.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.quicksight.kotlin.enums.ThemeType.Companion.toKotlin as themeTypeToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.ThemeConfiguration.Companion.toKotlin as themeConfigurationToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.ThemeResourcePermission.Companion.toKotlin as themeResourcePermissionToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.ThemeVersion.Companion.toKotlin as themeVersionToKotlin
/**
* Builder for [Theme].
*/
@PulumiTagMarker
public class ThemeResourceBuilder internal constructor() {
public var name: String? = null
public var args: ThemeArgs = ThemeArgs()
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 ThemeArgsBuilder.() -> Unit) {
val builder = ThemeArgsBuilder()
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(): Theme {
val builtJavaResource = com.pulumi.awsnative.quicksight.Theme(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Theme(builtJavaResource)
}
}
/**
* Definition of the AWS::QuickSight::Theme Resource Type.
*/
public class Theme internal constructor(
override val javaResource: com.pulumi.awsnative.quicksight.Theme,
) : KotlinCustomResource(javaResource, ThemeMapper) {
/**
* The Amazon Resource Name (ARN) of the theme.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The ID of the AWS account where you want to store the new theme.
*/
public val awsAccountId: Output
get() = javaResource.awsAccountId().applyValue({ args0 -> args0 })
/**
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes defined by Amazon QuickSight. For a list of the starting themes, use `ListThemes` or choose *Themes* from within an analysis.
*/
public val baseThemeId: Output
get() = javaResource.baseThemeId().applyValue({ args0 -> args0 })
/**
* The theme configuration, which contains the theme display properties.
*/
public val configuration: Output
get() = javaResource.configuration().applyValue({ args0 ->
args0.let({ args0 ->
themeConfigurationToKotlin(args0)
})
})
/**
* The date and time that the theme was created.
*/
public val createdTime: Output
get() = javaResource.createdTime().applyValue({ args0 -> args0 })
/**
* The date and time that the theme was last updated.
*/
public val lastUpdatedTime: Output
get() = javaResource.lastUpdatedTime().applyValue({ args0 -> args0 })
/**
* A display name for the theme.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A valid grouping of resource permissions to apply to the new theme.
*/
public val permissions: Output>?
get() = javaResource.permissions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> themeResourcePermissionToKotlin(args0) })
})
}).orElse(null)
})
/**
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* An ID for the theme that you want to create. The theme ID is unique per AWS Region in each AWS account.
*/
public val themeId: Output
get() = javaResource.themeId().applyValue({ args0 -> args0 })
/**
* Theme type.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 ->
args0.let({ args0 ->
themeTypeToKotlin(args0)
})
})
public val version: Output
get() = javaResource.version().applyValue({ args0 ->
args0.let({ args0 ->
themeVersionToKotlin(args0)
})
})
/**
* A description of the first version of the theme that you're creating. Every time `UpdateTheme` is called, a new version is created. Each version of the theme has a description of the version in the `VersionDescription` field.
*/
public val versionDescription: Output?
get() = javaResource.versionDescription().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object ThemeMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.quicksight.Theme::class == javaResource::class
override fun map(javaResource: Resource): Theme = Theme(
javaResource as
com.pulumi.awsnative.quicksight.Theme,
)
}
/**
* @see [Theme].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Theme].
*/
public suspend fun theme(name: String, block: suspend ThemeResourceBuilder.() -> Unit): Theme {
val builder = ThemeResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Theme].
* @param name The _unique_ name of the resulting resource.
*/
public fun theme(name: String): Theme {
val builder = ThemeResourceBuilder()
builder.name(name)
return builder.build()
}