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

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

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

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



/**
 * Maps attributes or field names of Confluence pages 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.
 */
public class ConfluencePageToIndexFieldMapping private constructor(builder: Builder) {
    /**
     * The name of the field in the data source.
     */
    public val dataSourceFieldName: aws.sdk.kotlin.services.kendra.model.ConfluencePageFieldName? = builder.dataSourceFieldName
    /**
     * The format for date fields in the data source. If the field specified in `DataSourceFieldName` is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
     */
    public val dateFieldFormat: kotlin.String? = builder.dateFieldFormat
    /**
     * The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
     */
    public val indexFieldName: kotlin.String? = builder.indexFieldName

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

    override fun toString(): kotlin.String = buildString {
        append("ConfluencePageToIndexFieldMapping(")
        append("dataSourceFieldName=$dataSourceFieldName,")
        append("dateFieldFormat=$dateFieldFormat,")
        append("indexFieldName=$indexFieldName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataSourceFieldName?.hashCode() ?: 0
        result = 31 * result + (dateFieldFormat?.hashCode() ?: 0)
        result = 31 * result + (indexFieldName?.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 ConfluencePageToIndexFieldMapping

        if (dataSourceFieldName != other.dataSourceFieldName) return false
        if (dateFieldFormat != other.dateFieldFormat) return false
        if (indexFieldName != other.indexFieldName) return false

        return true
    }

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

    public class Builder {
        /**
         * The name of the field in the data source.
         */
        public var dataSourceFieldName: aws.sdk.kotlin.services.kendra.model.ConfluencePageFieldName? = null
        /**
         * The format for date fields in the data source. If the field specified in `DataSourceFieldName` is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
         */
        public var dateFieldFormat: kotlin.String? = null
        /**
         * The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
         */
        public var indexFieldName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.ConfluencePageToIndexFieldMapping) : this() {
            this.dataSourceFieldName = x.dataSourceFieldName
            this.dateFieldFormat = x.dateFieldFormat
            this.indexFieldName = x.indexFieldName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy