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

com.pulumi.awsnative.kendra.kotlin.DataSourceArgs.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.kendra.kotlin

import com.pulumi.awsnative.kendra.DataSourceArgs.builder
import com.pulumi.awsnative.kendra.kotlin.enums.DataSourceType
import com.pulumi.awsnative.kendra.kotlin.inputs.DataSourceConfigurationArgs
import com.pulumi.awsnative.kendra.kotlin.inputs.DataSourceConfigurationArgsBuilder
import com.pulumi.awsnative.kendra.kotlin.inputs.DataSourceCustomDocumentEnrichmentConfigurationArgs
import com.pulumi.awsnative.kendra.kotlin.inputs.DataSourceCustomDocumentEnrichmentConfigurationArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Kendra DataSource
 * @property customDocumentEnrichmentConfiguration Configuration information for altering document metadata and content during the document ingestion process.
 * @property dataSourceConfiguration Configuration information for an Amazon Kendra data source. The contents of the configuration depend on the type of data source. You can only specify one type of data source in the configuration.
 * You can't specify the `Configuration` parameter when the `Type` parameter is set to `CUSTOM` .
 * The `Configuration` parameter is required for all other data sources.
 * @property description A description for the data source connector.
 * @property indexId The identifier of the index you want to use with the data source connector.
 * @property languageCode The code for a language. This shows a supported language for all documents in the data source. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html) .
 * @property name The name of the data source.
 * @property roleArn The Amazon Resource Name (ARN) of a role with permission to access the data source.
 * You can't specify the `RoleArn` parameter when the `Type` parameter is set to `CUSTOM` .
 * The `RoleArn` parameter is required for all other data sources.
 * @property schedule Sets the frequency that Amazon Kendra checks the documents in your data source and updates the index. If you don't set a schedule, Amazon Kendra doesn't periodically update the index.
 * @property tags Tags for labeling the data source
 * @property type The type of the data source.
 */
public data class DataSourceArgs(
    public val customDocumentEnrichmentConfiguration: Output? = null,
    public val dataSourceConfiguration: Output? = null,
    public val description: Output? = null,
    public val indexId: Output? = null,
    public val languageCode: Output? = null,
    public val name: Output? = null,
    public val roleArn: Output? = null,
    public val schedule: Output? = null,
    public val tags: Output>? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.kendra.DataSourceArgs =
        com.pulumi.awsnative.kendra.DataSourceArgs.builder()
            .customDocumentEnrichmentConfiguration(
                customDocumentEnrichmentConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .dataSourceConfiguration(
                dataSourceConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .indexId(indexId?.applyValue({ args0 -> args0 }))
            .languageCode(languageCode?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .schedule(schedule?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .type(type?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [DataSourceArgs].
 */
@PulumiTagMarker
public class DataSourceArgsBuilder internal constructor() {
    private var customDocumentEnrichmentConfiguration:
        Output? = null

    private var dataSourceConfiguration: Output? = null

    private var description: Output? = null

    private var indexId: Output? = null

    private var languageCode: Output? = null

    private var name: Output? = null

    private var roleArn: Output? = null

    private var schedule: Output? = null

    private var tags: Output>? = null

    private var type: Output? = null

    /**
     * @param value Configuration information for altering document metadata and content during the document ingestion process.
     */
    @JvmName("sxlpdvqfdvinaiix")
    public suspend fun customDocumentEnrichmentConfiguration(`value`: Output) {
        this.customDocumentEnrichmentConfiguration = value
    }

    /**
     * @param value Configuration information for an Amazon Kendra data source. The contents of the configuration depend on the type of data source. You can only specify one type of data source in the configuration.
     * You can't specify the `Configuration` parameter when the `Type` parameter is set to `CUSTOM` .
     * The `Configuration` parameter is required for all other data sources.
     */
    @JvmName("xlwlrvqjrajqydpj")
    public suspend fun dataSourceConfiguration(`value`: Output) {
        this.dataSourceConfiguration = value
    }

    /**
     * @param value A description for the data source connector.
     */
    @JvmName("asacifqujjugkaod")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The identifier of the index you want to use with the data source connector.
     */
    @JvmName("vhekbpsdmwwvimfy")
    public suspend fun indexId(`value`: Output) {
        this.indexId = value
    }

    /**
     * @param value The code for a language. This shows a supported language for all documents in the data source. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html) .
     */
    @JvmName("eswiggidfbqxypda")
    public suspend fun languageCode(`value`: Output) {
        this.languageCode = value
    }

    /**
     * @param value The name of the data source.
     */
    @JvmName("tetkcebjsrhfrivy")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of a role with permission to access the data source.
     * You can't specify the `RoleArn` parameter when the `Type` parameter is set to `CUSTOM` .
     * The `RoleArn` parameter is required for all other data sources.
     */
    @JvmName("qefcfxawowokewfs")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value Sets the frequency that Amazon Kendra checks the documents in your data source and updates the index. If you don't set a schedule, Amazon Kendra doesn't periodically update the index.
     */
    @JvmName("farndmbtprhufyie")
    public suspend fun schedule(`value`: Output) {
        this.schedule = value
    }

    /**
     * @param value Tags for labeling the data source
     */
    @JvmName("kjtqbdmngxweelwe")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("vqhhdsvddyxrmcyc")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values Tags for labeling the data source
     */
    @JvmName("usioawgtwuvbfeyy")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The type of the data source.
     */
    @JvmName("ynrsasufpiebbxtq")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Configuration information for altering document metadata and content during the document ingestion process.
     */
    @JvmName("cuevsggkdfacmdfm")
    public suspend fun customDocumentEnrichmentConfiguration(`value`: DataSourceCustomDocumentEnrichmentConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customDocumentEnrichmentConfiguration = mapped
    }

    /**
     * @param argument Configuration information for altering document metadata and content during the document ingestion process.
     */
    @JvmName("grhfddeowtviobxv")
    public suspend fun customDocumentEnrichmentConfiguration(argument: suspend DataSourceCustomDocumentEnrichmentConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = DataSourceCustomDocumentEnrichmentConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.customDocumentEnrichmentConfiguration = mapped
    }

    /**
     * @param value Configuration information for an Amazon Kendra data source. The contents of the configuration depend on the type of data source. You can only specify one type of data source in the configuration.
     * You can't specify the `Configuration` parameter when the `Type` parameter is set to `CUSTOM` .
     * The `Configuration` parameter is required for all other data sources.
     */
    @JvmName("pmnhrpyodmtpfuuw")
    public suspend fun dataSourceConfiguration(`value`: DataSourceConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSourceConfiguration = mapped
    }

    /**
     * @param argument Configuration information for an Amazon Kendra data source. The contents of the configuration depend on the type of data source. You can only specify one type of data source in the configuration.
     * You can't specify the `Configuration` parameter when the `Type` parameter is set to `CUSTOM` .
     * The `Configuration` parameter is required for all other data sources.
     */
    @JvmName("hvsmljtowyaonmxl")
    public suspend fun dataSourceConfiguration(argument: suspend DataSourceConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = DataSourceConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dataSourceConfiguration = mapped
    }

    /**
     * @param value A description for the data source connector.
     */
    @JvmName("meajwkanrxpfxvau")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The identifier of the index you want to use with the data source connector.
     */
    @JvmName("wxlbcnhugsdswdvd")
    public suspend fun indexId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.indexId = mapped
    }

    /**
     * @param value The code for a language. This shows a supported language for all documents in the data source. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html) .
     */
    @JvmName("ilpbqrnbsafoksbf")
    public suspend fun languageCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.languageCode = mapped
    }

    /**
     * @param value The name of the data source.
     */
    @JvmName("fbnsuovmkopsmqkb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of a role with permission to access the data source.
     * You can't specify the `RoleArn` parameter when the `Type` parameter is set to `CUSTOM` .
     * The `RoleArn` parameter is required for all other data sources.
     */
    @JvmName("mgmwhpvumrxdqkef")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value Sets the frequency that Amazon Kendra checks the documents in your data source and updates the index. If you don't set a schedule, Amazon Kendra doesn't periodically update the index.
     */
    @JvmName("qtvirvbsrxenwhpc")
    public suspend fun schedule(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedule = mapped
    }

    /**
     * @param value Tags for labeling the data source
     */
    @JvmName("jamskoerqagsvghb")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Tags for labeling the data source
     */
    @JvmName("dufewqvbyunelrad")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Tags for labeling the data source
     */
    @JvmName("xwbetlnmgslvlwqr")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Tags for labeling the data source
     */
    @JvmName("plvrhgsqqlqswdug")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Tags for labeling the data source
     */
    @JvmName("pnxxjtlyacnrmiiy")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The type of the data source.
     */
    @JvmName("hqhgrkfwjrtcbqqk")
    public suspend fun type(`value`: DataSourceType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): DataSourceArgs = DataSourceArgs(
        customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration,
        dataSourceConfiguration = dataSourceConfiguration,
        description = description,
        indexId = indexId,
        languageCode = languageCode,
        name = name,
        roleArn = roleArn,
        schedule = schedule,
        tags = tags,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy