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

commonMain.aws.sdk.kotlin.services.devicefarm.model.Counters.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.devicefarm.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents entity counters.
 */
public class Counters private constructor(builder: Builder) {
    /**
     * The number of errored entities.
     */
    public val errored: kotlin.Int? = builder.errored
    /**
     * The number of failed entities.
     */
    public val failed: kotlin.Int? = builder.failed
    /**
     * The number of passed entities.
     */
    public val passed: kotlin.Int? = builder.passed
    /**
     * The number of skipped entities.
     */
    public val skipped: kotlin.Int? = builder.skipped
    /**
     * The number of stopped entities.
     */
    public val stopped: kotlin.Int? = builder.stopped
    /**
     * The total number of entities.
     */
    public val total: kotlin.Int? = builder.total
    /**
     * The number of warned entities.
     */
    public val warned: kotlin.Int? = builder.warned

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

    override fun toString(): kotlin.String = buildString {
        append("Counters(")
        append("errored=$errored,")
        append("failed=$failed,")
        append("passed=$passed,")
        append("skipped=$skipped,")
        append("stopped=$stopped,")
        append("total=$total,")
        append("warned=$warned")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errored ?: 0
        result = 31 * result + (failed ?: 0)
        result = 31 * result + (passed ?: 0)
        result = 31 * result + (skipped ?: 0)
        result = 31 * result + (stopped ?: 0)
        result = 31 * result + (total ?: 0)
        result = 31 * result + (warned ?: 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 Counters

        if (errored != other.errored) return false
        if (failed != other.failed) return false
        if (passed != other.passed) return false
        if (skipped != other.skipped) return false
        if (stopped != other.stopped) return false
        if (total != other.total) return false
        if (warned != other.warned) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The number of errored entities.
         */
        public var errored: kotlin.Int? = null
        /**
         * The number of failed entities.
         */
        public var failed: kotlin.Int? = null
        /**
         * The number of passed entities.
         */
        public var passed: kotlin.Int? = null
        /**
         * The number of skipped entities.
         */
        public var skipped: kotlin.Int? = null
        /**
         * The number of stopped entities.
         */
        public var stopped: kotlin.Int? = null
        /**
         * The total number of entities.
         */
        public var total: kotlin.Int? = null
        /**
         * The number of warned entities.
         */
        public var warned: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.Counters) : this() {
            this.errored = x.errored
            this.failed = x.failed
            this.passed = x.passed
            this.skipped = x.skipped
            this.stopped = x.stopped
            this.total = x.total
            this.warned = x.warned
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy