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

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

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

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



/**
 * Lifecycle.
 */
class LifeCycle private constructor(builder: Builder) {
    /**
     * Lifecycle added to service data and time.
     */
    val addedToServiceDateTime: kotlin.String? = builder.addedToServiceDateTime
    /**
     * Lifecycle elapsed time and duration.
     */
    val elapsedReplicationDuration: kotlin.String? = builder.elapsedReplicationDuration
    /**
     * Lifecycle replication initiation date and time.
     */
    val firstByteDateTime: kotlin.String? = builder.firstByteDateTime
    /**
     * Lifecycle last Cutover.
     */
    val lastCutover: aws.sdk.kotlin.services.mgn.model.LifeCycleLastCutover? = builder.lastCutover
    /**
     * Lifecycle last seen date and time.
     */
    val lastSeenByServiceDateTime: kotlin.String? = builder.lastSeenByServiceDateTime
    /**
     * Lifecycle last Test.
     */
    val lastTest: aws.sdk.kotlin.services.mgn.model.LifeCycleLastTest? = builder.lastTest
    /**
     * Lifecycle state.
     */
    val state: aws.sdk.kotlin.services.mgn.model.LifeCycleState? = builder.state

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

    override fun toString(): kotlin.String = buildString {
        append("LifeCycle(")
        append("addedToServiceDateTime=$addedToServiceDateTime,")
        append("elapsedReplicationDuration=$elapsedReplicationDuration,")
        append("firstByteDateTime=$firstByteDateTime,")
        append("lastCutover=$lastCutover,")
        append("lastSeenByServiceDateTime=$lastSeenByServiceDateTime,")
        append("lastTest=$lastTest,")
        append("state=$state)")
    }

    override fun hashCode(): kotlin.Int {
        var result = addedToServiceDateTime?.hashCode() ?: 0
        result = 31 * result + (elapsedReplicationDuration?.hashCode() ?: 0)
        result = 31 * result + (firstByteDateTime?.hashCode() ?: 0)
        result = 31 * result + (lastCutover?.hashCode() ?: 0)
        result = 31 * result + (lastSeenByServiceDateTime?.hashCode() ?: 0)
        result = 31 * result + (lastTest?.hashCode() ?: 0)
        result = 31 * result + (state?.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 LifeCycle

        if (addedToServiceDateTime != other.addedToServiceDateTime) return false
        if (elapsedReplicationDuration != other.elapsedReplicationDuration) return false
        if (firstByteDateTime != other.firstByteDateTime) return false
        if (lastCutover != other.lastCutover) return false
        if (lastSeenByServiceDateTime != other.lastSeenByServiceDateTime) return false
        if (lastTest != other.lastTest) return false
        if (state != other.state) return false

        return true
    }

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

    class Builder {
        /**
         * Lifecycle added to service data and time.
         */
        var addedToServiceDateTime: kotlin.String? = null
        /**
         * Lifecycle elapsed time and duration.
         */
        var elapsedReplicationDuration: kotlin.String? = null
        /**
         * Lifecycle replication initiation date and time.
         */
        var firstByteDateTime: kotlin.String? = null
        /**
         * Lifecycle last Cutover.
         */
        var lastCutover: aws.sdk.kotlin.services.mgn.model.LifeCycleLastCutover? = null
        /**
         * Lifecycle last seen date and time.
         */
        var lastSeenByServiceDateTime: kotlin.String? = null
        /**
         * Lifecycle last Test.
         */
        var lastTest: aws.sdk.kotlin.services.mgn.model.LifeCycleLastTest? = null
        /**
         * Lifecycle state.
         */
        var state: aws.sdk.kotlin.services.mgn.model.LifeCycleState? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mgn.model.LifeCycle) : this() {
            this.addedToServiceDateTime = x.addedToServiceDateTime
            this.elapsedReplicationDuration = x.elapsedReplicationDuration
            this.firstByteDateTime = x.firstByteDateTime
            this.lastCutover = x.lastCutover
            this.lastSeenByServiceDateTime = x.lastSeenByServiceDateTime
            this.lastTest = x.lastTest
            this.state = x.state
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy