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

commonMain.aws.sdk.kotlin.services.ssmsap.model.AssociatedHost.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssmsap.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the properties of the associated host.
 */
public class AssociatedHost private constructor(builder: Builder) {
    /**
     * The ID of the Amazon EC2 instance.
     */
    public val ec2InstanceId: kotlin.String? = builder.ec2InstanceId
    /**
     * The name of the host.
     */
    public val hostname: kotlin.String? = builder.hostname
    /**
     * The IP addresses of the associated host.
     */
    public val ipAddresses: List? = builder.ipAddresses
    /**
     * The version of the operating system.
     */
    public val osVersion: kotlin.String? = builder.osVersion

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

    override fun toString(): kotlin.String = buildString {
        append("AssociatedHost(")
        append("ec2InstanceId=$ec2InstanceId,")
        append("hostname=$hostname,")
        append("ipAddresses=$ipAddresses,")
        append("osVersion=$osVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ec2InstanceId?.hashCode() ?: 0
        result = 31 * result + (hostname?.hashCode() ?: 0)
        result = 31 * result + (ipAddresses?.hashCode() ?: 0)
        result = 31 * result + (osVersion?.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 AssociatedHost

        if (ec2InstanceId != other.ec2InstanceId) return false
        if (hostname != other.hostname) return false
        if (ipAddresses != other.ipAddresses) return false
        if (osVersion != other.osVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the Amazon EC2 instance.
         */
        public var ec2InstanceId: kotlin.String? = null
        /**
         * The name of the host.
         */
        public var hostname: kotlin.String? = null
        /**
         * The IP addresses of the associated host.
         */
        public var ipAddresses: List? = null
        /**
         * The version of the operating system.
         */
        public var osVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmsap.model.AssociatedHost) : this() {
            this.ec2InstanceId = x.ec2InstanceId
            this.hostname = x.hostname
            this.ipAddresses = x.ipAddresses
            this.osVersion = x.osVersion
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy