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

commonMain.aws.sdk.kotlin.services.codecatalyst.model.PersistentStorage.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.codecatalyst.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about the persistent storage for a Dev Environment.
 */
public class PersistentStorage private constructor(builder: Builder) {
    /**
     * The size of the persistent storage in gigabytes (specifically GiB).
     *
     * Valid values for storage are based on memory sizes in 16GB increments. Valid values are 16, 32, and 64.
     */
    public val sizeInGib: kotlin.Int = requireNotNull(builder.sizeInGib) { "A non-null value must be provided for sizeInGib" }

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

    override fun toString(): kotlin.String = buildString {
        append("PersistentStorage(")
        append("sizeInGib=$sizeInGib")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = sizeInGib
        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 PersistentStorage

        if (sizeInGib != other.sizeInGib) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The size of the persistent storage in gigabytes (specifically GiB).
         *
         * Valid values for storage are based on memory sizes in 16GB increments. Valid values are 16, 32, and 64.
         */
        public var sizeInGib: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecatalyst.model.PersistentStorage) : this() {
            this.sizeInGib = x.sizeInGib
        }

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

        internal fun correctErrors(): Builder {
            if (sizeInGib == null) sizeInGib = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy