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

commonMain.aws.sdk.kotlin.services.mgn.model.ChangeServerLifeCycleStateRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.mgn.model



class ChangeServerLifeCycleStateRequest private constructor(builder: Builder) {
    /**
     * The request to change the source server migration lifecycle state.
     */
    val lifeCycle: aws.sdk.kotlin.services.mgn.model.ChangeServerLifeCycleStateSourceServerLifecycle? = builder.lifeCycle
    /**
     * The request to change the source server migration lifecycle state by source server ID.
     */
    val sourceServerId: kotlin.String? = builder.sourceServerId

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

    override fun toString(): kotlin.String = buildString {
        append("ChangeServerLifeCycleStateRequest(")
        append("lifeCycle=$lifeCycle,")
        append("sourceServerId=$sourceServerId)")
    }

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

        if (lifeCycle != other.lifeCycle) return false
        if (sourceServerId != other.sourceServerId) return false

        return true
    }

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

    class Builder {
        /**
         * The request to change the source server migration lifecycle state.
         */
        var lifeCycle: aws.sdk.kotlin.services.mgn.model.ChangeServerLifeCycleStateSourceServerLifecycle? = null
        /**
         * The request to change the source server migration lifecycle state by source server ID.
         */
        var sourceServerId: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mgn.model.ChangeServerLifeCycleStateRequest) : this() {
            this.lifeCycle = x.lifeCycle
            this.sourceServerId = x.sourceServerId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy