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

commonMain.aws.sdk.kotlin.services.snowdevicemanagement.model.Capacity.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.snowdevicemanagement.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The physical capacity of the Amazon Web Services Snow Family device.
 */
public class Capacity private constructor(builder: Builder) {
    /**
     * The amount of capacity available for use on the device.
     */
    public val available: kotlin.Long? = builder.available
    /**
     * The name of the type of capacity, such as memory.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The total capacity on the device.
     */
    public val total: kotlin.Long? = builder.total
    /**
     * The unit of measure for the type of capacity.
     */
    public val unit: kotlin.String? = builder.unit
    /**
     * The amount of capacity used on the device.
     */
    public val used: kotlin.Long? = builder.used

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

    override fun toString(): kotlin.String = buildString {
        append("Capacity(")
        append("available=$available,")
        append("name=$name,")
        append("total=$total,")
        append("unit=$unit,")
        append("used=$used")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = available?.hashCode() ?: 0
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (total?.hashCode() ?: 0)
        result = 31 * result + (unit?.hashCode() ?: 0)
        result = 31 * result + (used?.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 Capacity

        if (available != other.available) return false
        if (name != other.name) return false
        if (total != other.total) return false
        if (unit != other.unit) return false
        if (used != other.used) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The amount of capacity available for use on the device.
         */
        public var available: kotlin.Long? = null
        /**
         * The name of the type of capacity, such as memory.
         */
        public var name: kotlin.String? = null
        /**
         * The total capacity on the device.
         */
        public var total: kotlin.Long? = null
        /**
         * The unit of measure for the type of capacity.
         */
        public var unit: kotlin.String? = null
        /**
         * The amount of capacity used on the device.
         */
        public var used: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.snowdevicemanagement.model.Capacity) : this() {
            this.available = x.available
            this.name = x.name
            this.total = x.total
            this.unit = x.unit
            this.used = x.used
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy