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

commonMain.aws.sdk.kotlin.services.sms.model.Server.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sms.model



/**
 * Represents a server.
 */
public class Server private constructor(builder: Builder) {
    /**
     * The ID of the replication job.
     */
    public val replicationJobId: kotlin.String? = builder.replicationJobId
    /**
     * Indicates whether the replication job is deleted or failed.
     */
    public val replicationJobTerminated: kotlin.Boolean? = builder.replicationJobTerminated
    /**
     * The ID of the server.
     */
    public val serverId: kotlin.String? = builder.serverId
    /**
     * The type of server.
     */
    public val serverType: aws.sdk.kotlin.services.sms.model.ServerType? = builder.serverType
    /**
     * Information about the VM server.
     */
    public val vmServer: aws.sdk.kotlin.services.sms.model.VmServer? = builder.vmServer

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

    override fun toString(): kotlin.String = buildString {
        append("Server(")
        append("replicationJobId=$replicationJobId,")
        append("replicationJobTerminated=$replicationJobTerminated,")
        append("serverId=$serverId,")
        append("serverType=$serverType,")
        append("vmServer=$vmServer")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = replicationJobId?.hashCode() ?: 0
        result = 31 * result + (replicationJobTerminated?.hashCode() ?: 0)
        result = 31 * result + (serverId?.hashCode() ?: 0)
        result = 31 * result + (serverType?.hashCode() ?: 0)
        result = 31 * result + (vmServer?.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 Server

        if (replicationJobId != other.replicationJobId) return false
        if (replicationJobTerminated != other.replicationJobTerminated) return false
        if (serverId != other.serverId) return false
        if (serverType != other.serverType) return false
        if (vmServer != other.vmServer) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the replication job.
         */
        public var replicationJobId: kotlin.String? = null
        /**
         * Indicates whether the replication job is deleted or failed.
         */
        public var replicationJobTerminated: kotlin.Boolean? = null
        /**
         * The ID of the server.
         */
        public var serverId: kotlin.String? = null
        /**
         * The type of server.
         */
        public var serverType: aws.sdk.kotlin.services.sms.model.ServerType? = null
        /**
         * Information about the VM server.
         */
        public var vmServer: aws.sdk.kotlin.services.sms.model.VmServer? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sms.model.Server) : this() {
            this.replicationJobId = x.replicationJobId
            this.replicationJobTerminated = x.replicationJobTerminated
            this.serverId = x.serverId
            this.serverType = x.serverType
            this.vmServer = x.vmServer
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy