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

commonMain.aws.sdk.kotlin.services.codebuild.model.TestReportSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codebuild.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about a test report.
 */
public class TestReportSummary private constructor(builder: Builder) {
    /**
     * The number of nanoseconds it took to run all of the test cases in this report.
     */
    public val durationInNanoSeconds: kotlin.Long = requireNotNull(builder.durationInNanoSeconds) { "A non-null value must be provided for durationInNanoSeconds" }
    /**
     * A map that contains the number of each type of status returned by the test results in this `TestReportSummary`.
     */
    public val statusCounts: Map = requireNotNull(builder.statusCounts) { "A non-null value must be provided for statusCounts" }
    /**
     * The number of test cases in this `TestReportSummary`. The total includes truncated test cases.
     */
    public val total: kotlin.Int = requireNotNull(builder.total) { "A non-null value must be provided for total" }

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

    override fun toString(): kotlin.String = buildString {
        append("TestReportSummary(")
        append("durationInNanoSeconds=$durationInNanoSeconds,")
        append("statusCounts=$statusCounts,")
        append("total=$total")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = durationInNanoSeconds.hashCode()
        result = 31 * result + (statusCounts.hashCode())
        result = 31 * result + (total)
        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 TestReportSummary

        if (durationInNanoSeconds != other.durationInNanoSeconds) return false
        if (statusCounts != other.statusCounts) return false
        if (total != other.total) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The number of nanoseconds it took to run all of the test cases in this report.
         */
        public var durationInNanoSeconds: kotlin.Long? = null
        /**
         * A map that contains the number of each type of status returned by the test results in this `TestReportSummary`.
         */
        public var statusCounts: Map? = null
        /**
         * The number of test cases in this `TestReportSummary`. The total includes truncated test cases.
         */
        public var total: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codebuild.model.TestReportSummary) : this() {
            this.durationInNanoSeconds = x.durationInNanoSeconds
            this.statusCounts = x.statusCounts
            this.total = x.total
        }

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

        internal fun correctErrors(): Builder {
            if (durationInNanoSeconds == null) durationInNanoSeconds = 0L
            if (statusCounts == null) statusCounts = emptyMap()
            if (total == null) total = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy