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

commonMain.aws.sdk.kotlin.services.deadline.model.DependencyCounts.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.deadline.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The number of dependencies for the consumer.
 */
public class DependencyCounts private constructor(builder: Builder) {
    /**
     * The number of consumers resolved.
     */
    public val consumersResolved: kotlin.Int = requireNotNull(builder.consumersResolved) { "A non-null value must be provided for consumersResolved" }
    /**
     * The number of unresolved consumers.
     */
    public val consumersUnresolved: kotlin.Int = requireNotNull(builder.consumersUnresolved) { "A non-null value must be provided for consumersUnresolved" }
    /**
     * The number of resolved dependencies.
     */
    public val dependenciesResolved: kotlin.Int = requireNotNull(builder.dependenciesResolved) { "A non-null value must be provided for dependenciesResolved" }
    /**
     * The number of unresolved dependencies.
     */
    public val dependenciesUnresolved: kotlin.Int = requireNotNull(builder.dependenciesUnresolved) { "A non-null value must be provided for dependenciesUnresolved" }

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

    override fun toString(): kotlin.String = buildString {
        append("DependencyCounts(")
        append("consumersResolved=$consumersResolved,")
        append("consumersUnresolved=$consumersUnresolved,")
        append("dependenciesResolved=$dependenciesResolved,")
        append("dependenciesUnresolved=$dependenciesUnresolved")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = consumersResolved
        result = 31 * result + (consumersUnresolved)
        result = 31 * result + (dependenciesResolved)
        result = 31 * result + (dependenciesUnresolved)
        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 DependencyCounts

        if (consumersResolved != other.consumersResolved) return false
        if (consumersUnresolved != other.consumersUnresolved) return false
        if (dependenciesResolved != other.dependenciesResolved) return false
        if (dependenciesUnresolved != other.dependenciesUnresolved) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The number of consumers resolved.
         */
        public var consumersResolved: kotlin.Int? = null
        /**
         * The number of unresolved consumers.
         */
        public var consumersUnresolved: kotlin.Int? = null
        /**
         * The number of resolved dependencies.
         */
        public var dependenciesResolved: kotlin.Int? = null
        /**
         * The number of unresolved dependencies.
         */
        public var dependenciesUnresolved: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.DependencyCounts) : this() {
            this.consumersResolved = x.consumersResolved
            this.consumersUnresolved = x.consumersUnresolved
            this.dependenciesResolved = x.dependenciesResolved
            this.dependenciesUnresolved = x.dependenciesUnresolved
        }

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

        internal fun correctErrors(): Builder {
            if (consumersResolved == null) consumersResolved = 0
            if (consumersUnresolved == null) consumersUnresolved = 0
            if (dependenciesResolved == null) dependenciesResolved = 0
            if (dependenciesUnresolved == null) dependenciesUnresolved = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy