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

commonMain.aws.sdk.kotlin.services.kendra.model.ConfluenceSpaceConfiguration.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kendra.model



/**
 * Configuration information for indexing Confluence spaces.
 */
public class ConfluenceSpaceConfiguration private constructor(builder: Builder) {
    /**
     * `TRUE` to index archived spaces.
     */
    public val crawlArchivedSpaces: kotlin.Boolean = builder.crawlArchivedSpaces
    /**
     * `TRUE` to index personal spaces. You can add restrictions to items in personal spaces. If personal spaces are indexed, queries without user context information may return restricted items from a personal space in their results. For more information, see [Filtering on user context](https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html).
     */
    public val crawlPersonalSpaces: kotlin.Boolean = builder.crawlPersonalSpaces
    /**
     * A list of space keys of Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are not indexed. If a space is in both the `ExcludeSpaces` and the `IncludeSpaces` list, the space is excluded.
     */
    public val excludeSpaces: List? = builder.excludeSpaces
    /**
     * A list of space keys for Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are indexed. Spaces that aren't in the list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra logs an error when the data source is synchronized. If a space is in both the `IncludeSpaces` and the `ExcludeSpaces` list, the space is excluded.
     */
    public val includeSpaces: List? = builder.includeSpaces
    /**
     * Maps attributes or field names of Confluence spaces to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Confluence fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html). The Confluence data source field names must exist in your Confluence custom metadata.
     *
     * If you specify the `SpaceFieldMappings` parameter, you must specify at least one field mapping.
     */
    public val spaceFieldMappings: List? = builder.spaceFieldMappings

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.ConfluenceSpaceConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ConfluenceSpaceConfiguration(")
        append("crawlArchivedSpaces=$crawlArchivedSpaces,")
        append("crawlPersonalSpaces=$crawlPersonalSpaces,")
        append("excludeSpaces=$excludeSpaces,")
        append("includeSpaces=$includeSpaces,")
        append("spaceFieldMappings=$spaceFieldMappings")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = crawlArchivedSpaces.hashCode()
        result = 31 * result + (crawlPersonalSpaces.hashCode())
        result = 31 * result + (excludeSpaces?.hashCode() ?: 0)
        result = 31 * result + (includeSpaces?.hashCode() ?: 0)
        result = 31 * result + (spaceFieldMappings?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as ConfluenceSpaceConfiguration

        if (crawlArchivedSpaces != other.crawlArchivedSpaces) return false
        if (crawlPersonalSpaces != other.crawlPersonalSpaces) return false
        if (excludeSpaces != other.excludeSpaces) return false
        if (includeSpaces != other.includeSpaces) return false
        if (spaceFieldMappings != other.spaceFieldMappings) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.ConfluenceSpaceConfiguration = Builder(this).apply(block).build()

    public class Builder {
        /**
         * `TRUE` to index archived spaces.
         */
        public var crawlArchivedSpaces: kotlin.Boolean = false
        /**
         * `TRUE` to index personal spaces. You can add restrictions to items in personal spaces. If personal spaces are indexed, queries without user context information may return restricted items from a personal space in their results. For more information, see [Filtering on user context](https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html).
         */
        public var crawlPersonalSpaces: kotlin.Boolean = false
        /**
         * A list of space keys of Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are not indexed. If a space is in both the `ExcludeSpaces` and the `IncludeSpaces` list, the space is excluded.
         */
        public var excludeSpaces: List? = null
        /**
         * A list of space keys for Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are indexed. Spaces that aren't in the list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra logs an error when the data source is synchronized. If a space is in both the `IncludeSpaces` and the `ExcludeSpaces` list, the space is excluded.
         */
        public var includeSpaces: List? = null
        /**
         * Maps attributes or field names of Confluence spaces to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Confluence fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html). The Confluence data source field names must exist in your Confluence custom metadata.
         *
         * If you specify the `SpaceFieldMappings` parameter, you must specify at least one field mapping.
         */
        public var spaceFieldMappings: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.ConfluenceSpaceConfiguration) : this() {
            this.crawlArchivedSpaces = x.crawlArchivedSpaces
            this.crawlPersonalSpaces = x.crawlPersonalSpaces
            this.excludeSpaces = x.excludeSpaces
            this.includeSpaces = x.includeSpaces
            this.spaceFieldMappings = x.spaceFieldMappings
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.kendra.model.ConfluenceSpaceConfiguration = ConfluenceSpaceConfiguration(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy