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

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

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

import com.pulumi.awsnative.kendra.inputs.DataSourceWorkDocsConfigurationArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property crawlComments `TRUE` to include comments on documents in your index. Including comments in your index means each comment is a document that can be searched on.
 * The default is set to `FALSE` .
 * @property exclusionPatterns A list of regular expression patterns to exclude certain files in your Amazon WorkDocs site repository. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
 * @property fieldMappings A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
 * @property inclusionPatterns A list of regular expression patterns to include certain files in your Amazon WorkDocs site repository. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
 * @property organizationId The identifier of the directory corresponding to your Amazon WorkDocs site repository.
 * You can find the organization ID in the [AWS Directory Service](https://docs.aws.amazon.com/directoryservicev2/) by going to *Active Directory* , then *Directories* . Your Amazon WorkDocs site directory has an ID, which is the organization ID. You can also set up a new Amazon WorkDocs directory in the AWS Directory Service console and enable a Amazon WorkDocs site for the directory in the Amazon WorkDocs console.
 * @property useChangeLog `TRUE` to use the Amazon WorkDocs change log to determine which documents require updating in the index. Depending on the change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in Amazon WorkDocs.
 */
public data class DataSourceWorkDocsConfigurationArgs(
    public val crawlComments: Output? = null,
    public val exclusionPatterns: Output>? = null,
    public val fieldMappings: Output>? = null,
    public val inclusionPatterns: Output>? = null,
    public val organizationId: Output,
    public val useChangeLog: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.kendra.inputs.DataSourceWorkDocsConfigurationArgs =
        com.pulumi.awsnative.kendra.inputs.DataSourceWorkDocsConfigurationArgs.builder()
            .crawlComments(crawlComments?.applyValue({ args0 -> args0 }))
            .exclusionPatterns(exclusionPatterns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .fieldMappings(
                fieldMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .inclusionPatterns(inclusionPatterns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .organizationId(organizationId.applyValue({ args0 -> args0 }))
            .useChangeLog(useChangeLog?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DataSourceWorkDocsConfigurationArgs].
 */
@PulumiTagMarker
public class DataSourceWorkDocsConfigurationArgsBuilder internal constructor() {
    private var crawlComments: Output? = null

    private var exclusionPatterns: Output>? = null

    private var fieldMappings: Output>? = null

    private var inclusionPatterns: Output>? = null

    private var organizationId: Output? = null

    private var useChangeLog: Output? = null

    /**
     * @param value `TRUE` to include comments on documents in your index. Including comments in your index means each comment is a document that can be searched on.
     * The default is set to `FALSE` .
     */
    @JvmName("gfrplfhgmjhobvjq")
    public suspend fun crawlComments(`value`: Output) {
        this.crawlComments = value
    }

    /**
     * @param value A list of regular expression patterns to exclude certain files in your Amazon WorkDocs site repository. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("lgyllskhavayvqpn")
    public suspend fun exclusionPatterns(`value`: Output>) {
        this.exclusionPatterns = value
    }

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

    /**
     * @param values A list of regular expression patterns to exclude certain files in your Amazon WorkDocs site repository. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("asyjjrkyheungepx")
    public suspend fun exclusionPatterns(values: List>) {
        this.exclusionPatterns = Output.all(values)
    }

    /**
     * @param value A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
     */
    @JvmName("riwvliejyoiicevb")
    public suspend fun fieldMappings(`value`: Output>) {
        this.fieldMappings = value
    }

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

    /**
     * @param values A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
     */
    @JvmName("cuytvxmvacvlvbxx")
    public suspend fun fieldMappings(values: List>) {
        this.fieldMappings = Output.all(values)
    }

    /**
     * @param value A list of regular expression patterns to include certain files in your Amazon WorkDocs site repository. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("ujmlclkdhulnxhjl")
    public suspend fun inclusionPatterns(`value`: Output>) {
        this.inclusionPatterns = value
    }

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

    /**
     * @param values A list of regular expression patterns to include certain files in your Amazon WorkDocs site repository. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("esyuwxcwegrrsnql")
    public suspend fun inclusionPatterns(values: List>) {
        this.inclusionPatterns = Output.all(values)
    }

    /**
     * @param value The identifier of the directory corresponding to your Amazon WorkDocs site repository.
     * You can find the organization ID in the [AWS Directory Service](https://docs.aws.amazon.com/directoryservicev2/) by going to *Active Directory* , then *Directories* . Your Amazon WorkDocs site directory has an ID, which is the organization ID. You can also set up a new Amazon WorkDocs directory in the AWS Directory Service console and enable a Amazon WorkDocs site for the directory in the Amazon WorkDocs console.
     */
    @JvmName("sfauopwtlviiuylq")
    public suspend fun organizationId(`value`: Output) {
        this.organizationId = value
    }

    /**
     * @param value `TRUE` to use the Amazon WorkDocs change log to determine which documents require updating in the index. Depending on the change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in Amazon WorkDocs.
     */
    @JvmName("ajynpjhbvncugfvj")
    public suspend fun useChangeLog(`value`: Output) {
        this.useChangeLog = value
    }

    /**
     * @param value `TRUE` to include comments on documents in your index. Including comments in your index means each comment is a document that can be searched on.
     * The default is set to `FALSE` .
     */
    @JvmName("maiqbitiwaeymbqg")
    public suspend fun crawlComments(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.crawlComments = mapped
    }

    /**
     * @param value A list of regular expression patterns to exclude certain files in your Amazon WorkDocs site repository. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("hsmcgjhagrcyfvbq")
    public suspend fun exclusionPatterns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exclusionPatterns = mapped
    }

    /**
     * @param values A list of regular expression patterns to exclude certain files in your Amazon WorkDocs site repository. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("lcqomehnxewtevuh")
    public suspend fun exclusionPatterns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.exclusionPatterns = mapped
    }

    /**
     * @param value A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
     */
    @JvmName("yuukwvisediqbgwi")
    public suspend fun fieldMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fieldMappings = mapped
    }

    /**
     * @param argument A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
     */
    @JvmName("lghjnvfoyaootppl")
    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 A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
     */
    @JvmName("hjmwmoadfwtteinm")
    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 A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
     */
    @JvmName("sjydpkjmiwkyhysj")
    public suspend fun fieldMappings(argument: suspend DataSourceToIndexFieldMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DataSourceToIndexFieldMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.fieldMappings = mapped
    }

    /**
     * @param values A list of `DataSourceToIndexFieldMapping` objects that map Amazon WorkDocs data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon WorkDocs fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs custom metadata.
     */
    @JvmName("ijdpblisnwxinarq")
    public suspend fun fieldMappings(vararg values: DataSourceToIndexFieldMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fieldMappings = mapped
    }

    /**
     * @param value A list of regular expression patterns to include certain files in your Amazon WorkDocs site repository. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("oqvokbdldtqejuju")
    public suspend fun inclusionPatterns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inclusionPatterns = mapped
    }

    /**
     * @param values A list of regular expression patterns to include certain files in your Amazon WorkDocs site repository. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    @JvmName("ypllgwspjgfnilyi")
    public suspend fun inclusionPatterns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inclusionPatterns = mapped
    }

    /**
     * @param value The identifier of the directory corresponding to your Amazon WorkDocs site repository.
     * You can find the organization ID in the [AWS Directory Service](https://docs.aws.amazon.com/directoryservicev2/) by going to *Active Directory* , then *Directories* . Your Amazon WorkDocs site directory has an ID, which is the organization ID. You can also set up a new Amazon WorkDocs directory in the AWS Directory Service console and enable a Amazon WorkDocs site for the directory in the Amazon WorkDocs console.
     */
    @JvmName("usgomsmuwrpaurjc")
    public suspend fun organizationId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.organizationId = mapped
    }

    /**
     * @param value `TRUE` to use the Amazon WorkDocs change log to determine which documents require updating in the index. Depending on the change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in Amazon WorkDocs.
     */
    @JvmName("aejjydyksuwhpjjl")
    public suspend fun useChangeLog(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.useChangeLog = mapped
    }

    internal fun build(): DataSourceWorkDocsConfigurationArgs = DataSourceWorkDocsConfigurationArgs(
        crawlComments = crawlComments,
        exclusionPatterns = exclusionPatterns,
        fieldMappings = fieldMappings,
        inclusionPatterns = inclusionPatterns,
        organizationId = organizationId ?: throw PulumiNullFieldException("organizationId"),
        useChangeLog = useChangeLog,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy