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

com.pulumi.awsnative.amplifyuibuilder.kotlin.Theme.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.amplifyuibuilder.kotlin

import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.ThemeValues
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.ThemeValues.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
import kotlin.collections.Map

/**
 * 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.amplifyuibuilder.Theme(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Theme(builtJavaResource)
    }
}

/**
 * Definition of AWS::AmplifyUIBuilder::Theme Resource Type
 */
public class Theme internal constructor(
    override val javaResource: com.pulumi.awsnative.amplifyuibuilder.Theme,
) : KotlinCustomResource(javaResource, ThemeMapper) {
    /**
     * The unique ID for the Amplify app associated with the theme.
     */
    public val appId: Output?
        get() = javaResource.appId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The ID for the theme.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The time that the theme was created.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The name of the backend environment that is a part of the Amplify app.
     */
    public val environmentName: Output?
        get() = javaResource.environmentName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The time that the theme was modified.
     */
    public val modifiedAt: Output
        get() = javaResource.modifiedAt().applyValue({ args0 -> args0 })

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

    /**
     * Describes the properties that can be overriden to customize a theme.
     */
    public val overrides: Output>?
        get() = javaResource.overrides().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * One or more key-value pairs to use when tagging the theme.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * A list of key-value pairs that defines the properties of the theme.
     */
    public val values: Output>?
        get() = javaResource.values().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object ThemeMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.amplifyuibuilder.Theme::class == javaResource::class

    override fun map(javaResource: Resource): Theme = Theme(
        javaResource as
            com.pulumi.awsnative.amplifyuibuilder.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()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy