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

commonMain.aws.sdk.kotlin.services.ssmsap.model.Host.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 Dedicated Host.
 */
public class Host private constructor(builder: Builder) {
    /**
     * The ID of Amazon EC2 instance.
     */
    public val ec2InstanceId: kotlin.String? = builder.ec2InstanceId
    /**
     * The IP address of the Dedicated Host.
     */
    public val hostIp: kotlin.String? = builder.hostIp
    /**
     * The name of the Dedicated Host.
     */
    public val hostName: kotlin.String? = builder.hostName
    /**
     * The role of the Dedicated Host.
     */
    public val hostRole: aws.sdk.kotlin.services.ssmsap.model.HostRole? = builder.hostRole
    /**
     * The instance ID of the instance on the Dedicated Host.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * 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.Host = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("Host(")
        append("ec2InstanceId=$ec2InstanceId,")
        append("hostIp=$hostIp,")
        append("hostName=$hostName,")
        append("hostRole=$hostRole,")
        append("instanceId=$instanceId,")
        append("osVersion=$osVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ec2InstanceId?.hashCode() ?: 0
        result = 31 * result + (hostIp?.hashCode() ?: 0)
        result = 31 * result + (hostName?.hashCode() ?: 0)
        result = 31 * result + (hostRole?.hashCode() ?: 0)
        result = 31 * result + (instanceId?.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 Host

        if (ec2InstanceId != other.ec2InstanceId) return false
        if (hostIp != other.hostIp) return false
        if (hostName != other.hostName) return false
        if (hostRole != other.hostRole) return false
        if (instanceId != other.instanceId) return false
        if (osVersion != other.osVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of Amazon EC2 instance.
         */
        public var ec2InstanceId: kotlin.String? = null
        /**
         * The IP address of the Dedicated Host.
         */
        public var hostIp: kotlin.String? = null
        /**
         * The name of the Dedicated Host.
         */
        public var hostName: kotlin.String? = null
        /**
         * The role of the Dedicated Host.
         */
        public var hostRole: aws.sdk.kotlin.services.ssmsap.model.HostRole? = null
        /**
         * The instance ID of the instance on the Dedicated Host.
         */
        public var instanceId: kotlin.String? = 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.Host) : this() {
            this.ec2InstanceId = x.ec2InstanceId
            this.hostIp = x.hostIp
            this.hostName = x.hostName
            this.hostRole = x.hostRole
            this.instanceId = x.instanceId
            this.osVersion = x.osVersion
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy