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

com.pulumi.awsnative.bedrock.kotlin.FlowVersion.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.bedrock.kotlin

import com.pulumi.awsnative.bedrock.kotlin.enums.FlowVersionFlowStatus
import com.pulumi.awsnative.bedrock.kotlin.outputs.FlowVersionFlowDefinition
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 com.pulumi.awsnative.bedrock.kotlin.enums.FlowVersionFlowStatus.Companion.toKotlin as flowVersionFlowStatusToKotlin
import com.pulumi.awsnative.bedrock.kotlin.outputs.FlowVersionFlowDefinition.Companion.toKotlin as flowVersionFlowDefinitionToKotlin

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

    public var args: FlowVersionArgs = FlowVersionArgs()

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

/**
 * Definition of AWS::Bedrock::FlowVersion Resource Type
 */
public class FlowVersion internal constructor(
    override val javaResource: com.pulumi.awsnative.bedrock.FlowVersion,
) : KotlinCustomResource(javaResource, FlowVersionMapper) {
    /**
     * Time Stamp.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * A KMS key ARN
     */
    public val customerEncryptionKeyArn: Output
        get() = javaResource.customerEncryptionKeyArn().applyValue({ args0 -> args0 })

    public val definition: Output
        get() = javaResource.definition().applyValue({ args0 ->
            args0.let({ args0 ->
                flowVersionFlowDefinitionToKotlin(args0)
            })
        })

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

    /**
     * ARN of a IAM role
     */
    public val executionRoleArn: Output
        get() = javaResource.executionRoleArn().applyValue({ args0 -> args0 })

    /**
     * Arn representation of the Flow
     */
    public val flowArn: Output
        get() = javaResource.flowArn().applyValue({ args0 -> args0 })

    /**
     * Identifier for a Flow
     */
    public val flowId: Output
        get() = javaResource.flowId().applyValue({ args0 -> args0 })

    /**
     * Name for the flow
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The status of the flow.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                flowVersionFlowStatusToKotlin(args0)
            })
        })

    /**
     * Numerical Version.
     */
    public val version: Output
        get() = javaResource.version().applyValue({ args0 -> args0 })
}

public object FlowVersionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.bedrock.FlowVersion::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy