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



public class AttachDiskRequest private constructor(builder: Builder) {
    /**
     * The unique Lightsail disk name (e.g., `my-disk`).
     */
    public val diskName: kotlin.String? = builder.diskName
    /**
     * The disk path to expose to the instance (e.g., `/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("diskName=$diskName,")
        append("diskPath=$diskPath,")
        append("instanceName=$instanceName)")
    }

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

    public class Builder {
        /**
         * The unique Lightsail disk name (e.g., `my-disk`).
         */
        public var diskName: kotlin.String? = null
        /**
         * The disk path to expose to the instance (e.g., `/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.diskName = x.diskName
            this.diskPath = x.diskPath
            this.instanceName = x.instanceName
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy