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

com.pulumi.awsnative.entityresolution.kotlin.SchemaMapping.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.entityresolution.kotlin

import com.pulumi.awsnative.entityresolution.kotlin.outputs.SchemaMappingSchemaInputAttribute
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.entityresolution.kotlin.outputs.SchemaMappingSchemaInputAttribute.Companion.toKotlin as schemaMappingSchemaInputAttributeToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: SchemaMappingArgs = SchemaMappingArgs()

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

/**
 * SchemaMapping defined in AWS Entity Resolution service
 */
public class SchemaMapping internal constructor(
    override val javaResource: com.pulumi.awsnative.entityresolution.SchemaMapping,
) : KotlinCustomResource(javaResource, SchemaMappingMapper) {
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

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

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

    /**
     * The SchemaMapping attributes input
     */
    public val mappedInputFields: Output>
        get() = javaResource.mappedInputFields().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> schemaMappingSchemaInputAttributeToKotlin(args0) })
            })
        })

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

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

    /**
     * The tags used to organize, track, or control access for this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

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

public object SchemaMappingMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.entityresolution.SchemaMapping::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy