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

commonMain.aws.sdk.kotlin.services.outposts.model.Ec2Capacity.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.outposts.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about EC2 capacity.
 */
public class Ec2Capacity private constructor(builder: Builder) {
    /**
     * The family of the EC2 capacity.
     */
    public val family: kotlin.String? = builder.family
    /**
     * The maximum size of the EC2 capacity.
     */
    public val maxSize: kotlin.String? = builder.maxSize
    /**
     * The quantity of the EC2 capacity.
     */
    public val quantity: kotlin.String? = builder.quantity

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

    override fun toString(): kotlin.String = buildString {
        append("Ec2Capacity(")
        append("family=$family,")
        append("maxSize=$maxSize,")
        append("quantity=$quantity")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = family?.hashCode() ?: 0
        result = 31 * result + (maxSize?.hashCode() ?: 0)
        result = 31 * result + (quantity?.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 Ec2Capacity

        if (family != other.family) return false
        if (maxSize != other.maxSize) return false
        if (quantity != other.quantity) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The family of the EC2 capacity.
         */
        public var family: kotlin.String? = null
        /**
         * The maximum size of the EC2 capacity.
         */
        public var maxSize: kotlin.String? = null
        /**
         * The quantity of the EC2 capacity.
         */
        public var quantity: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.outposts.model.Ec2Capacity) : this() {
            this.family = x.family
            this.maxSize = x.maxSize
            this.quantity = x.quantity
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy