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

commonMain.aws.sdk.kotlin.services.snowdevicemanagement.model.InstanceBlockDeviceMapping.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.snowdevicemanagement.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The description of a block device mapping.
 */
public class InstanceBlockDeviceMapping private constructor(builder: Builder) {
    /**
     * The block device name.
     */
    public val deviceName: kotlin.String? = builder.deviceName
    /**
     * The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS) volumes when the instance is launched.
     */
    public val ebs: aws.sdk.kotlin.services.snowdevicemanagement.model.EbsInstanceBlockDevice? = builder.ebs

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

    override fun toString(): kotlin.String = buildString {
        append("InstanceBlockDeviceMapping(")
        append("deviceName=$deviceName,")
        append("ebs=$ebs")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deviceName?.hashCode() ?: 0
        result = 31 * result + (ebs?.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 InstanceBlockDeviceMapping

        if (deviceName != other.deviceName) return false
        if (ebs != other.ebs) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The block device name.
         */
        public var deviceName: kotlin.String? = null
        /**
         * The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS) volumes when the instance is launched.
         */
        public var ebs: aws.sdk.kotlin.services.snowdevicemanagement.model.EbsInstanceBlockDevice? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.snowdevicemanagement.model.InstanceBlockDeviceMapping) : this() {
            this.deviceName = x.deviceName
            this.ebs = x.ebs
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.snowdevicemanagement.model.EbsInstanceBlockDevice] inside the given [block]
         */
        public fun ebs(block: aws.sdk.kotlin.services.snowdevicemanagement.model.EbsInstanceBlockDevice.Builder.() -> kotlin.Unit) {
            this.ebs = aws.sdk.kotlin.services.snowdevicemanagement.model.EbsInstanceBlockDevice.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy