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

commonMain.aws.sdk.kotlin.services.lightsail.model.AttachDiskRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model

import aws.smithy.kotlin.runtime.SdkDsl

public class AttachDiskRequest private constructor(builder: Builder) {
    /**
     * A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is `False`.
     *
     * This value only applies to Lightsail for Research resources.
     */
    public val autoMounting: kotlin.Boolean? = builder.autoMounting
    /**
     * The unique Lightsail disk name (`my-disk`).
     */
    public val diskName: kotlin.String? = builder.diskName
    /**
     * The disk path to expose to the instance (`/dev/xvdf`).
     */
    public val diskPath: kotlin.String? = builder.diskPath
    /**
     * The name of the Lightsail instance where you want to utilize the storage disk.
     */
    public val instanceName: kotlin.String? = builder.instanceName

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

    override fun toString(): kotlin.String = buildString {
        append("AttachDiskRequest(")
        append("autoMounting=$autoMounting,")
        append("diskName=$diskName,")
        append("diskPath=$diskPath,")
        append("instanceName=$instanceName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoMounting?.hashCode() ?: 0
        result = 31 * result + (diskName?.hashCode() ?: 0)
        result = 31 * result + (diskPath?.hashCode() ?: 0)
        result = 31 * result + (instanceName?.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 AttachDiskRequest

        if (autoMounting != other.autoMounting) return false
        if (diskName != other.diskName) return false
        if (diskPath != other.diskPath) return false
        if (instanceName != other.instanceName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is `False`.
         *
         * This value only applies to Lightsail for Research resources.
         */
        public var autoMounting: kotlin.Boolean? = null
        /**
         * The unique Lightsail disk name (`my-disk`).
         */
        public var diskName: kotlin.String? = null
        /**
         * The disk path to expose to the instance (`/dev/xvdf`).
         */
        public var diskPath: kotlin.String? = null
        /**
         * The name of the Lightsail instance where you want to utilize the storage disk.
         */
        public var instanceName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.AttachDiskRequest) : this() {
            this.autoMounting = x.autoMounting
            this.diskName = x.diskName
            this.diskPath = x.diskPath
            this.instanceName = x.instanceName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy