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

commonMain.aws.sdk.kotlin.services.snowdevicemanagement.model.InstanceSummary.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.snowdevicemanagement.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * The details about the instance.
 */
public class InstanceSummary private constructor(builder: Builder) {
    /**
     * A structure containing details about the instance.
     */
    public val instance: aws.sdk.kotlin.services.snowdevicemanagement.model.Instance? = builder.instance
    /**
     * When the instance summary was last updated.
     */
    public val lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedAt

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

    override fun toString(): kotlin.String = buildString {
        append("InstanceSummary(")
        append("instance=$instance,")
        append("lastUpdatedAt=$lastUpdatedAt")
        append(")")
    }

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

        if (instance != other.instance) return false
        if (lastUpdatedAt != other.lastUpdatedAt) return false

        return true
    }

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

    public class Builder {
        /**
         * A structure containing details about the instance.
         */
        public var instance: aws.sdk.kotlin.services.snowdevicemanagement.model.Instance? = null
        /**
         * When the instance summary was last updated.
         */
        public var lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.snowdevicemanagement.model.InstanceSummary) : this() {
            this.instance = x.instance
            this.lastUpdatedAt = x.lastUpdatedAt
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy