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

com.pulumi.awsnative.omics.kotlin.Workflow.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.omics.kotlin

import com.pulumi.awsnative.omics.kotlin.enums.WorkflowAccelerators
import com.pulumi.awsnative.omics.kotlin.enums.WorkflowEngine
import com.pulumi.awsnative.omics.kotlin.enums.WorkflowStatus
import com.pulumi.awsnative.omics.kotlin.enums.WorkflowType
import com.pulumi.awsnative.omics.kotlin.outputs.WorkflowParameter
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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.awsnative.omics.kotlin.enums.WorkflowAccelerators.Companion.toKotlin as workflowAcceleratorsToKotlin
import com.pulumi.awsnative.omics.kotlin.enums.WorkflowEngine.Companion.toKotlin as workflowEngineToKotlin
import com.pulumi.awsnative.omics.kotlin.enums.WorkflowStatus.Companion.toKotlin as workflowStatusToKotlin
import com.pulumi.awsnative.omics.kotlin.enums.WorkflowType.Companion.toKotlin as workflowTypeToKotlin
import com.pulumi.awsnative.omics.kotlin.outputs.WorkflowParameter.Companion.toKotlin as workflowParameterToKotlin

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

    public var args: WorkflowArgs = WorkflowArgs()

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

/**
 * Definition of AWS::Omics::Workflow Resource Type
 */
public class Workflow internal constructor(
    override val javaResource: com.pulumi.awsnative.omics.Workflow,
) : KotlinCustomResource(javaResource, WorkflowMapper) {
    public val accelerators: Output?
        get() = javaResource.accelerators().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    workflowAcceleratorsToKotlin(args0)
                })
            }).orElse(null)
        })

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

    /**
     * The workflow's ID.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * When the workflow was created.
     */
    public val creationTime: Output
        get() = javaResource.creationTime().applyValue({ args0 -> args0 })

    /**
     * The URI of a definition for the workflow.
     */
    public val definitionUri: Output?
        get() = javaResource.definitionUri().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * An engine for the workflow.
     */
    public val engine: Output?
        get() = javaResource.engine().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    workflowEngineToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The path of the main definition file for the workflow.
     */
    public val main: Output?
        get() = javaResource.main().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

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

    /**
     * The workflow's parameter template.
     */
    public val parameterTemplate: Output>?
        get() = javaResource.parameterTemplate().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(
                        args0.value.let({ args0 ->
                            workflowParameterToKotlin(args0)
                        }),
                    )
                }).toMap()
            }).orElse(null)
        })

    /**
     * The workflow's status.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                workflowStatusToKotlin(args0)
            })
        })

    /**
     * The default storage capacity for the workflow runs, in gibibytes.
     */
    public val storageCapacity: Output?
        get() = javaResource.storageCapacity().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Tags for the workflow.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The workflow's type.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 ->
            args0.let({ args0 ->
                workflowTypeToKotlin(args0)
            })
        })
}

public object WorkflowMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.omics.Workflow::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy