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

commonMain.aws.sdk.kotlin.services.ssm.model.Node.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssm.model

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

/**
 * Details about an individual managed node.
 */
public class Node private constructor(builder: Builder) {
    /**
     * The UTC timestamp for when the managed node data was last captured.
     */
    public val captureTime: aws.smithy.kotlin.runtime.time.Instant? = builder.captureTime
    /**
     * The ID of the managed node.
     */
    public val id: kotlin.String? = builder.id
    /**
     * Information about the type of node.
     */
    public val nodeType: aws.sdk.kotlin.services.ssm.model.NodeType? = builder.nodeType
    /**
     * Information about the ownership of the managed node.
     */
    public val owner: aws.sdk.kotlin.services.ssm.model.NodeOwnerInfo? = builder.owner
    /**
     * The Amazon Web Services Region that a managed node was created in or assigned to.
     */
    public val region: kotlin.String? = builder.region

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

    override fun toString(): kotlin.String = buildString {
        append("Node(")
        append("captureTime=$captureTime,")
        append("id=$id,")
        append("nodeType=$nodeType,")
        append("owner=$owner,")
        append("region=$region")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = captureTime?.hashCode() ?: 0
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (nodeType?.hashCode() ?: 0)
        result = 31 * result + (owner?.hashCode() ?: 0)
        result = 31 * result + (region?.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 Node

        if (captureTime != other.captureTime) return false
        if (id != other.id) return false
        if (nodeType != other.nodeType) return false
        if (owner != other.owner) return false
        if (region != other.region) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The UTC timestamp for when the managed node data was last captured.
         */
        public var captureTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the managed node.
         */
        public var id: kotlin.String? = null
        /**
         * Information about the type of node.
         */
        public var nodeType: aws.sdk.kotlin.services.ssm.model.NodeType? = null
        /**
         * Information about the ownership of the managed node.
         */
        public var owner: aws.sdk.kotlin.services.ssm.model.NodeOwnerInfo? = null
        /**
         * The Amazon Web Services Region that a managed node was created in or assigned to.
         */
        public var region: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.Node) : this() {
            this.captureTime = x.captureTime
            this.id = x.id
            this.nodeType = x.nodeType
            this.owner = x.owner
            this.region = x.region
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy