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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.VolumeConfiguration.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.computeoptimizer.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the configuration of an Amazon Elastic Block Store (Amazon EBS) volume.
 */
public class VolumeConfiguration private constructor(builder: Builder) {
    /**
     * Contains the image used to boot the instance during launch.
     */
    public val rootVolume: kotlin.Boolean? = builder.rootVolume
    /**
     * The baseline IOPS of the volume.
     */
    public val volumeBaselineIops: kotlin.Int = builder.volumeBaselineIops
    /**
     * The baseline throughput of the volume.
     */
    public val volumeBaselineThroughput: kotlin.Int = builder.volumeBaselineThroughput
    /**
     * The burst IOPS of the volume.
     */
    public val volumeBurstIops: kotlin.Int = builder.volumeBurstIops
    /**
     * The burst throughput of the volume.
     */
    public val volumeBurstThroughput: kotlin.Int = builder.volumeBurstThroughput
    /**
     * The size of the volume, in GiB.
     */
    public val volumeSize: kotlin.Int = builder.volumeSize
    /**
     * The volume type.
     *
     * This can be `gp2` for General Purpose SSD, `io1` or `io2` for Provisioned IOPS SSD, `st1` for Throughput Optimized HDD, `sc1` for Cold HDD, or `standard` for Magnetic volumes.
     */
    public val volumeType: kotlin.String? = builder.volumeType

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

    override fun toString(): kotlin.String = buildString {
        append("VolumeConfiguration(")
        append("rootVolume=$rootVolume,")
        append("volumeBaselineIops=$volumeBaselineIops,")
        append("volumeBaselineThroughput=$volumeBaselineThroughput,")
        append("volumeBurstIops=$volumeBurstIops,")
        append("volumeBurstThroughput=$volumeBurstThroughput,")
        append("volumeSize=$volumeSize,")
        append("volumeType=$volumeType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = rootVolume?.hashCode() ?: 0
        result = 31 * result + (volumeBaselineIops)
        result = 31 * result + (volumeBaselineThroughput)
        result = 31 * result + (volumeBurstIops)
        result = 31 * result + (volumeBurstThroughput)
        result = 31 * result + (volumeSize)
        result = 31 * result + (volumeType?.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 VolumeConfiguration

        if (rootVolume != other.rootVolume) return false
        if (volumeBaselineIops != other.volumeBaselineIops) return false
        if (volumeBaselineThroughput != other.volumeBaselineThroughput) return false
        if (volumeBurstIops != other.volumeBurstIops) return false
        if (volumeBurstThroughput != other.volumeBurstThroughput) return false
        if (volumeSize != other.volumeSize) return false
        if (volumeType != other.volumeType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Contains the image used to boot the instance during launch.
         */
        public var rootVolume: kotlin.Boolean? = null
        /**
         * The baseline IOPS of the volume.
         */
        public var volumeBaselineIops: kotlin.Int = 0
        /**
         * The baseline throughput of the volume.
         */
        public var volumeBaselineThroughput: kotlin.Int = 0
        /**
         * The burst IOPS of the volume.
         */
        public var volumeBurstIops: kotlin.Int = 0
        /**
         * The burst throughput of the volume.
         */
        public var volumeBurstThroughput: kotlin.Int = 0
        /**
         * The size of the volume, in GiB.
         */
        public var volumeSize: kotlin.Int = 0
        /**
         * The volume type.
         *
         * This can be `gp2` for General Purpose SSD, `io1` or `io2` for Provisioned IOPS SSD, `st1` for Throughput Optimized HDD, `sc1` for Cold HDD, or `standard` for Magnetic volumes.
         */
        public var volumeType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.VolumeConfiguration) : this() {
            this.rootVolume = x.rootVolume
            this.volumeBaselineIops = x.volumeBaselineIops
            this.volumeBaselineThroughput = x.volumeBaselineThroughput
            this.volumeBurstIops = x.volumeBurstIops
            this.volumeBurstThroughput = x.volumeBurstThroughput
            this.volumeSize = x.volumeSize
            this.volumeType = x.volumeType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy