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

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

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

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



public class BatchDeleteDocumentRequest private constructor(builder: Builder) {
    /**
     * Maps a particular data source sync job to a particular data source.
     */
    public val dataSourceSyncJobMetricTarget: aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetricTarget? = builder.dataSourceSyncJobMetricTarget
    /**
     * One or more identifiers for documents to delete from the index.
     */
    public val documentIdList: List? = builder.documentIdList
    /**
     * The identifier of the index that contains the documents to delete.
     */
    public val indexId: kotlin.String? = builder.indexId

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

    override fun toString(): kotlin.String = buildString {
        append("BatchDeleteDocumentRequest(")
        append("dataSourceSyncJobMetricTarget=$dataSourceSyncJobMetricTarget,")
        append("documentIdList=$documentIdList,")
        append("indexId=$indexId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataSourceSyncJobMetricTarget?.hashCode() ?: 0
        result = 31 * result + (documentIdList?.hashCode() ?: 0)
        result = 31 * result + (indexId?.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 BatchDeleteDocumentRequest

        if (dataSourceSyncJobMetricTarget != other.dataSourceSyncJobMetricTarget) return false
        if (documentIdList != other.documentIdList) return false
        if (indexId != other.indexId) return false

        return true
    }

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

    public class Builder {
        /**
         * Maps a particular data source sync job to a particular data source.
         */
        public var dataSourceSyncJobMetricTarget: aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetricTarget? = null
        /**
         * One or more identifiers for documents to delete from the index.
         */
        public var documentIdList: List? = null
        /**
         * The identifier of the index that contains the documents to delete.
         */
        public var indexId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.BatchDeleteDocumentRequest) : this() {
            this.dataSourceSyncJobMetricTarget = x.dataSourceSyncJobMetricTarget
            this.documentIdList = x.documentIdList
            this.indexId = x.indexId
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetricTarget] inside the given [block]
         */
        public fun dataSourceSyncJobMetricTarget(block: aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetricTarget.Builder.() -> kotlin.Unit) {
            this.dataSourceSyncJobMetricTarget = aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetricTarget.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy