commonMain.aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetrics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kendra-jvm Show documentation
Show all versions of kendra-jvm Show documentation
The AWS SDK for Kotlin client for kendra
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Maps a batch delete document request to a specific data source sync job. This is optional and should only be supplied when documents are deleted by a data source connector.
*/
public class DataSourceSyncJobMetrics private constructor(builder: Builder) {
/**
* The number of documents added from the data source up to now in the data source sync.
*/
public val documentsAdded: kotlin.String? = builder.documentsAdded
/**
* The number of documents deleted from the data source up to now in the data source sync run.
*/
public val documentsDeleted: kotlin.String? = builder.documentsDeleted
/**
* The number of documents that failed to sync from the data source up to now in the data source sync run.
*/
public val documentsFailed: kotlin.String? = builder.documentsFailed
/**
* The number of documents modified in the data source up to now in the data source sync run.
*/
public val documentsModified: kotlin.String? = builder.documentsModified
/**
* The current number of documents crawled by the current sync job in the data source.
*/
public val documentsScanned: kotlin.String? = builder.documentsScanned
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetrics = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DataSourceSyncJobMetrics(")
append("documentsAdded=$documentsAdded,")
append("documentsDeleted=$documentsDeleted,")
append("documentsFailed=$documentsFailed,")
append("documentsModified=$documentsModified,")
append("documentsScanned=$documentsScanned")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = documentsAdded?.hashCode() ?: 0
result = 31 * result + (documentsDeleted?.hashCode() ?: 0)
result = 31 * result + (documentsFailed?.hashCode() ?: 0)
result = 31 * result + (documentsModified?.hashCode() ?: 0)
result = 31 * result + (documentsScanned?.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 DataSourceSyncJobMetrics
if (documentsAdded != other.documentsAdded) return false
if (documentsDeleted != other.documentsDeleted) return false
if (documentsFailed != other.documentsFailed) return false
if (documentsModified != other.documentsModified) return false
if (documentsScanned != other.documentsScanned) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetrics = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of documents added from the data source up to now in the data source sync.
*/
public var documentsAdded: kotlin.String? = null
/**
* The number of documents deleted from the data source up to now in the data source sync run.
*/
public var documentsDeleted: kotlin.String? = null
/**
* The number of documents that failed to sync from the data source up to now in the data source sync run.
*/
public var documentsFailed: kotlin.String? = null
/**
* The number of documents modified in the data source up to now in the data source sync run.
*/
public var documentsModified: kotlin.String? = null
/**
* The current number of documents crawled by the current sync job in the data source.
*/
public var documentsScanned: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetrics) : this() {
this.documentsAdded = x.documentsAdded
this.documentsDeleted = x.documentsDeleted
this.documentsFailed = x.documentsFailed
this.documentsModified = x.documentsModified
this.documentsScanned = x.documentsScanned
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.DataSourceSyncJobMetrics = DataSourceSyncJobMetrics(this)
internal fun correctErrors(): Builder {
return this
}
}
}