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

commonMain.aws.sdk.kotlin.services.lookoutequipment.model.IngestedFilesSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lookoutequipment.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Gives statistics about how many files have been ingested, and which files have not been ingested, for a particular ingestion job.
 */
public class IngestedFilesSummary private constructor(builder: Builder) {
    /**
     * Indicates the number of files that were discarded. A file could be discarded because its format is invalid (for example, a jpg or pdf) or not readable.
     */
    public val discardedFiles: List? = builder.discardedFiles
    /**
     * Indicates the number of files that were successfully ingested.
     */
    public val ingestedNumberOfFiles: kotlin.Int = requireNotNull(builder.ingestedNumberOfFiles) { "A non-null value must be provided for ingestedNumberOfFiles" }
    /**
     * Indicates the total number of files that were submitted for ingestion.
     */
    public val totalNumberOfFiles: kotlin.Int = requireNotNull(builder.totalNumberOfFiles) { "A non-null value must be provided for totalNumberOfFiles" }

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

    override fun toString(): kotlin.String = buildString {
        append("IngestedFilesSummary(")
        append("discardedFiles=$discardedFiles,")
        append("ingestedNumberOfFiles=$ingestedNumberOfFiles,")
        append("totalNumberOfFiles=$totalNumberOfFiles")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = discardedFiles?.hashCode() ?: 0
        result = 31 * result + (ingestedNumberOfFiles)
        result = 31 * result + (totalNumberOfFiles)
        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 IngestedFilesSummary

        if (discardedFiles != other.discardedFiles) return false
        if (ingestedNumberOfFiles != other.ingestedNumberOfFiles) return false
        if (totalNumberOfFiles != other.totalNumberOfFiles) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates the number of files that were discarded. A file could be discarded because its format is invalid (for example, a jpg or pdf) or not readable.
         */
        public var discardedFiles: List? = null
        /**
         * Indicates the number of files that were successfully ingested.
         */
        public var ingestedNumberOfFiles: kotlin.Int? = null
        /**
         * Indicates the total number of files that were submitted for ingestion.
         */
        public var totalNumberOfFiles: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutequipment.model.IngestedFilesSummary) : this() {
            this.discardedFiles = x.discardedFiles
            this.ingestedNumberOfFiles = x.ingestedNumberOfFiles
            this.totalNumberOfFiles = x.totalNumberOfFiles
        }

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

        internal fun correctErrors(): Builder {
            if (ingestedNumberOfFiles == null) ingestedNumberOfFiles = 0
            if (totalNumberOfFiles == null) totalNumberOfFiles = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy