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

commonMain.aws.sdk.kotlin.services.ecr.model.ImageScanFindings.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ecr.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The details of an image scan.
 */
public class ImageScanFindings private constructor(builder: Builder) {
    /**
     * Details about the enhanced scan findings from Amazon Inspector.
     */
    public val enhancedFindings: List? = builder.enhancedFindings
    /**
     * The image vulnerability counts, sorted by severity.
     */
    public val findingSeverityCounts: Map? = builder.findingSeverityCounts
    /**
     * The findings from the image scan.
     */
    public val findings: List? = builder.findings
    /**
     * The time of the last completed image scan.
     */
    public val imageScanCompletedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.imageScanCompletedAt
    /**
     * The time when the vulnerability data was last scanned.
     */
    public val vulnerabilitySourceUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.vulnerabilitySourceUpdatedAt

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

    override fun toString(): kotlin.String = buildString {
        append("ImageScanFindings(")
        append("enhancedFindings=$enhancedFindings,")
        append("findingSeverityCounts=$findingSeverityCounts,")
        append("findings=$findings,")
        append("imageScanCompletedAt=$imageScanCompletedAt,")
        append("vulnerabilitySourceUpdatedAt=$vulnerabilitySourceUpdatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = enhancedFindings?.hashCode() ?: 0
        result = 31 * result + (findingSeverityCounts?.hashCode() ?: 0)
        result = 31 * result + (findings?.hashCode() ?: 0)
        result = 31 * result + (imageScanCompletedAt?.hashCode() ?: 0)
        result = 31 * result + (vulnerabilitySourceUpdatedAt?.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 ImageScanFindings

        if (enhancedFindings != other.enhancedFindings) return false
        if (findingSeverityCounts != other.findingSeverityCounts) return false
        if (findings != other.findings) return false
        if (imageScanCompletedAt != other.imageScanCompletedAt) return false
        if (vulnerabilitySourceUpdatedAt != other.vulnerabilitySourceUpdatedAt) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Details about the enhanced scan findings from Amazon Inspector.
         */
        public var enhancedFindings: List? = null
        /**
         * The image vulnerability counts, sorted by severity.
         */
        public var findingSeverityCounts: Map? = null
        /**
         * The findings from the image scan.
         */
        public var findings: List? = null
        /**
         * The time of the last completed image scan.
         */
        public var imageScanCompletedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time when the vulnerability data was last scanned.
         */
        public var vulnerabilitySourceUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecr.model.ImageScanFindings) : this() {
            this.enhancedFindings = x.enhancedFindings
            this.findingSeverityCounts = x.findingSeverityCounts
            this.findings = x.findings
            this.imageScanCompletedAt = x.imageScanCompletedAt
            this.vulnerabilitySourceUpdatedAt = x.vulnerabilitySourceUpdatedAt
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy