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

com.pulumi.awsnative.dms.kotlin.DataProvider.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.dms.kotlin

import com.pulumi.awsnative.dms.kotlin.enums.DataProviderEngine
import com.pulumi.awsnative.dms.kotlin.outputs.SettingsProperties
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.dms.kotlin.enums.DataProviderEngine.Companion.toKotlin as dataProviderEngineToKotlin
import com.pulumi.awsnative.dms.kotlin.outputs.SettingsProperties.Companion.toKotlin as settingsPropertiesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: DataProviderArgs = DataProviderArgs()

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

/**
 * Resource schema for AWS::DMS::DataProvider
 */
public class DataProvider internal constructor(
    override val javaResource: com.pulumi.awsnative.dms.DataProvider,
) : KotlinCustomResource(javaResource, DataProviderMapper) {
    /**
     * The data provider ARN.
     */
    public val dataProviderArn: Output
        get() = javaResource.dataProviderArn().applyValue({ args0 -> args0 })

    /**
     * The data provider creation time.
     */
    public val dataProviderCreationTime: Output
        get() = javaResource.dataProviderCreationTime().applyValue({ args0 -> args0 })

    /**
     * The property describes an identifier for the data provider. It is used for describing/deleting/modifying can be name/arn
     */
    public val dataProviderIdentifier: Output?
        get() = javaResource.dataProviderIdentifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The property describes a name to identify the data provider.
     */
    public val dataProviderName: Output?
        get() = javaResource.dataProviderName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * The property describes a data engine for the data provider.
     */
    public val engine: Output
        get() = javaResource.engine().applyValue({ args0 ->
            args0.let({ args0 ->
                dataProviderEngineToKotlin(args0)
            })
        })

    /**
     * The property describes the exact settings which can be modified
     */
    public val exactSettings: Output?
        get() = javaResource.exactSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The property identifies the exact type of settings for the data provider.
     */
    public val settings: Output?
        get() = javaResource.settings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    settingsPropertiesToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to 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 object DataProviderMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.dms.DataProvider::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy