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

com.pulumi.awsnative.kendra.kotlin.inputs.DataSourceColumnConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.kendra.kotlin.inputs

import com.pulumi.awsnative.kendra.inputs.DataSourceColumnConfigurationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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

/**
 *
 * @property changeDetectingColumns One to five columns that indicate when a document in the database has changed.
 * @property documentDataColumnName The column that contains the contents of the document.
 * @property documentIdColumnName The column that provides the document's identifier.
 * @property documentTitleColumnName The column that contains the title of the document.
 * @property fieldMappings An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
 */
public data class DataSourceColumnConfigurationArgs(
    public val changeDetectingColumns: Output>,
    public val documentDataColumnName: Output,
    public val documentIdColumnName: Output,
    public val documentTitleColumnName: Output? = null,
    public val fieldMappings: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.kendra.inputs.DataSourceColumnConfigurationArgs =
        com.pulumi.awsnative.kendra.inputs.DataSourceColumnConfigurationArgs.builder()
            .changeDetectingColumns(changeDetectingColumns.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .documentDataColumnName(documentDataColumnName.applyValue({ args0 -> args0 }))
            .documentIdColumnName(documentIdColumnName.applyValue({ args0 -> args0 }))
            .documentTitleColumnName(documentTitleColumnName?.applyValue({ args0 -> args0 }))
            .fieldMappings(
                fieldMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [DataSourceColumnConfigurationArgs].
 */
@PulumiTagMarker
public class DataSourceColumnConfigurationArgsBuilder internal constructor() {
    private var changeDetectingColumns: Output>? = null

    private var documentDataColumnName: Output? = null

    private var documentIdColumnName: Output? = null

    private var documentTitleColumnName: Output? = null

    private var fieldMappings: Output>? = null

    /**
     * @param value One to five columns that indicate when a document in the database has changed.
     */
    @JvmName("brhuibgrntosjyng")
    public suspend fun changeDetectingColumns(`value`: Output>) {
        this.changeDetectingColumns = value
    }

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

    /**
     * @param values One to five columns that indicate when a document in the database has changed.
     */
    @JvmName("qglnuikxufnlslgh")
    public suspend fun changeDetectingColumns(values: List>) {
        this.changeDetectingColumns = Output.all(values)
    }

    /**
     * @param value The column that contains the contents of the document.
     */
    @JvmName("fcgkyjgxkysohwmq")
    public suspend fun documentDataColumnName(`value`: Output) {
        this.documentDataColumnName = value
    }

    /**
     * @param value The column that provides the document's identifier.
     */
    @JvmName("mlxrcjhrrbetahyf")
    public suspend fun documentIdColumnName(`value`: Output) {
        this.documentIdColumnName = value
    }

    /**
     * @param value The column that contains the title of the document.
     */
    @JvmName("vjkfjnrsujeunkiw")
    public suspend fun documentTitleColumnName(`value`: Output) {
        this.documentTitleColumnName = value
    }

    /**
     * @param value An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
     */
    @JvmName("lqftqdyroganyxqh")
    public suspend fun fieldMappings(`value`: Output>) {
        this.fieldMappings = value
    }

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

    /**
     * @param values An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
     */
    @JvmName("eclbgwqrtdpldjud")
    public suspend fun fieldMappings(values: List>) {
        this.fieldMappings = Output.all(values)
    }

    /**
     * @param value One to five columns that indicate when a document in the database has changed.
     */
    @JvmName("aebhwjidwhbcbjjt")
    public suspend fun changeDetectingColumns(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.changeDetectingColumns = mapped
    }

    /**
     * @param values One to five columns that indicate when a document in the database has changed.
     */
    @JvmName("wifwyhsmodhsamrx")
    public suspend fun changeDetectingColumns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.changeDetectingColumns = mapped
    }

    /**
     * @param value The column that contains the contents of the document.
     */
    @JvmName("rsosibclkgqlvcme")
    public suspend fun documentDataColumnName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.documentDataColumnName = mapped
    }

    /**
     * @param value The column that provides the document's identifier.
     */
    @JvmName("xhnjytmckmaloosd")
    public suspend fun documentIdColumnName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.documentIdColumnName = mapped
    }

    /**
     * @param value The column that contains the title of the document.
     */
    @JvmName("abyhaekvvygoyerw")
    public suspend fun documentTitleColumnName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.documentTitleColumnName = mapped
    }

    /**
     * @param value An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
     */
    @JvmName("xbiykrcdycqplagc")
    public suspend fun fieldMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fieldMappings = mapped
    }

    /**
     * @param argument An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
     */
    @JvmName("yocptsrxaxltksnj")
    public suspend fun fieldMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DataSourceToIndexFieldMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.fieldMappings = mapped
    }

    /**
     * @param argument An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
     */
    @JvmName("jxbdmtwfcmipkbwl")
    public suspend fun fieldMappings(vararg argument: suspend DataSourceToIndexFieldMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DataSourceToIndexFieldMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.fieldMappings = mapped
    }

    /**
     * @param argument An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
     */
    @JvmName("dhpisrdevjxhjyna")
    public suspend fun fieldMappings(argument: suspend DataSourceToIndexFieldMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DataSourceToIndexFieldMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.fieldMappings = mapped
    }

    /**
     * @param values An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
     */
    @JvmName("bqunmvvkvejlgupy")
    public suspend fun fieldMappings(vararg values: DataSourceToIndexFieldMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fieldMappings = mapped
    }

    internal fun build(): DataSourceColumnConfigurationArgs = DataSourceColumnConfigurationArgs(
        changeDetectingColumns = changeDetectingColumns ?: throw
            PulumiNullFieldException("changeDetectingColumns"),
        documentDataColumnName = documentDataColumnName ?: throw
            PulumiNullFieldException("documentDataColumnName"),
        documentIdColumnName = documentIdColumnName ?: throw
            PulumiNullFieldException("documentIdColumnName"),
        documentTitleColumnName = documentTitleColumnName,
        fieldMappings = fieldMappings,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy