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

com.pulumi.awsnative.deadline.kotlin.QueueEnvironment.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.deadline.kotlin

import com.pulumi.awsnative.deadline.kotlin.enums.QueueEnvironmentEnvironmentTemplateType
import com.pulumi.awsnative.deadline.kotlin.enums.QueueEnvironmentEnvironmentTemplateType.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

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

    public var args: QueueEnvironmentArgs = QueueEnvironmentArgs()

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

/**
 * Definition of AWS::Deadline::QueueEnvironment Resource Type
 */
public class QueueEnvironment internal constructor(
    override val javaResource: com.pulumi.awsnative.deadline.QueueEnvironment,
) : KotlinCustomResource(javaResource, QueueEnvironmentMapper) {
    /**
     * The identifier assigned to the farm that contains the queue.
     */
    public val farmId: Output
        get() = javaResource.farmId().applyValue({ args0 -> args0 })

    /**
     * The name of the queue environment.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The queue environment's priority.
     */
    public val priority: Output
        get() = javaResource.priority().applyValue({ args0 -> args0 })

    /**
     * The queue environment ID.
     */
    public val queueEnvironmentId: Output
        get() = javaResource.queueEnvironmentId().applyValue({ args0 -> args0 })

    /**
     * The unique identifier of the queue that contains the environment.
     */
    public val queueId: Output
        get() = javaResource.queueId().applyValue({ args0 -> args0 })

    /**
     * A JSON or YAML template that describes the processing environment for the queue.
     */
    public val template: Output
        get() = javaResource.template().applyValue({ args0 -> args0 })

    /**
     * Specifies whether the template for the queue environment is JSON or YAML.
     */
    public val templateType: Output
        get() = javaResource.templateType().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
}

public object QueueEnvironmentMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.deadline.QueueEnvironment::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy