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

com.pulumi.awsnative.appstream.kotlin.Application.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.appstream.kotlin

import com.pulumi.awsnative.appstream.kotlin.outputs.ApplicationS3Location
import com.pulumi.awsnative.appstream.kotlin.outputs.ApplicationS3Location.Companion.toKotlin
import com.pulumi.awsnative.appstream.kotlin.outputs.ApplicationTag0Properties
import com.pulumi.awsnative.appstream.kotlin.outputs.ApplicationTag1Properties
import com.pulumi.core.Either
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 [Application].
 */
@PulumiTagMarker
public class ApplicationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ApplicationArgs = ApplicationArgs()

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

/**
 * Resource Type definition for AWS::AppStream::Application
 */
public class Application internal constructor(
    override val javaResource: com.pulumi.awsnative.appstream.Application,
) : KotlinCustomResource(javaResource, ApplicationMapper) {
    /**
     * The app block ARN with which the application should be associated.
     */
    public val appBlockArn: Output
        get() = javaResource.appBlockArn().applyValue({ args0 -> args0 })

    /**
     * The ARN of the application.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * A list of attributes to delete from an application.
     */
    public val attributesToDelete: Output>?
        get() = javaResource.attributesToDelete().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * The time when the application was created.
     */
    public val createdTime: Output
        get() = javaResource.createdTime().applyValue({ args0 -> args0 })

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

    /**
     * The display name of the application. This name is visible to users in the application catalog.
     */
    public val displayName: Output?
        get() = javaResource.displayName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The icon S3 location of the application.
     */
    public val iconS3Location: Output
        get() = javaResource.iconS3Location().applyValue({ args0 ->
            args0.let({ args0 ->
                toKotlin(args0)
            })
        })

    /**
     * The instance families the application supports.
     * *Allowed Values* : `GENERAL_PURPOSE` | `GRAPHICS_G4`
     */
    public val instanceFamilies: Output>
        get() = javaResource.instanceFamilies().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

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

    /**
     * The launch path of the application.
     */
    public val launchPath: Output
        get() = javaResource.launchPath().applyValue({ args0 -> args0 })

    /**
     * The name of the application. This name is visible to users when a name is not specified in the DisplayName property.
     * *Pattern* : `^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,100}$`
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The platforms the application supports.
     * *Allowed Values* : `WINDOWS_SERVER_2019` | `AMAZON_LINUX2`
     */
    public val platforms: Output>
        get() = javaResource.platforms().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The tags of the application.
     */
    public val tags: Output>>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.transform(
                        { args0 ->
                            args0.let({ args0 ->
                                com.pulumi.awsnative.appstream.kotlin.outputs.ApplicationTag0Properties.Companion.toKotlin(args0)
                            })
                        },
                        { args0 ->
                            args0.let({ args0 ->
                                com.pulumi.awsnative.appstream.kotlin.outputs.ApplicationTag1Properties.Companion.toKotlin(args0)
                            })
                        },
                    )
                })
            }).orElse(null)
        })

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

public object ApplicationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.appstream.Application::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy