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

com.pulumi.awsnative.comprehend.kotlin.Flywheel.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.comprehend.kotlin

import com.pulumi.awsnative.comprehend.kotlin.enums.FlywheelModelType
import com.pulumi.awsnative.comprehend.kotlin.outputs.FlywheelDataSecurityConfig
import com.pulumi.awsnative.comprehend.kotlin.outputs.FlywheelTaskConfig
import com.pulumi.awsnative.kotlin.outputs.Tag
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 com.pulumi.awsnative.comprehend.kotlin.enums.FlywheelModelType.Companion.toKotlin as flywheelModelTypeToKotlin
import com.pulumi.awsnative.comprehend.kotlin.outputs.FlywheelDataSecurityConfig.Companion.toKotlin as flywheelDataSecurityConfigToKotlin
import com.pulumi.awsnative.comprehend.kotlin.outputs.FlywheelTaskConfig.Companion.toKotlin as flywheelTaskConfigToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: FlywheelArgs = FlywheelArgs()

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

/**
 * The AWS::Comprehend::Flywheel resource creates an Amazon Comprehend Flywheel that enables customer to train their model.
 */
public class Flywheel internal constructor(
    override val javaResource: com.pulumi.awsnative.comprehend.Flywheel,
) : KotlinCustomResource(javaResource, FlywheelMapper) {
    /**
     * The Amazon Resource Number (ARN) of the active model version.
     */
    public val activeModelArn: Output?
        get() = javaResource.activeModelArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.
     */
    public val dataAccessRoleArn: Output
        get() = javaResource.dataAccessRoleArn().applyValue({ args0 -> args0 })

    /**
     * Amazon S3 URI of the data lake location.
     */
    public val dataLakeS3Uri: Output
        get() = javaResource.dataLakeS3Uri().applyValue({ args0 -> args0 })

    /**
     * Data security configuration.
     */
    public val dataSecurityConfig: Output?
        get() = javaResource.dataSecurityConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> flywheelDataSecurityConfigToKotlin(args0) })
            }).orElse(null)
        })

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

    /**
     * Model type of the flywheel's model.
     */
    public val modelType: Output?
        get() = javaResource.modelType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    flywheelModelTypeToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Tags associated with the endpoint being created. A tag is a key-value pair that adds metadata to the endpoint. For example, a tag with "Sales" as the key might be added to an endpoint to indicate its use by the sales department.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Configuration about the model associated with a flywheel.
     */
    public val taskConfig: Output?
        get() = javaResource.taskConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    flywheelTaskConfigToKotlin(args0)
                })
            }).orElse(null)
        })
}

public object FlywheelMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.comprehend.Flywheel::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy