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

commonMain.aws.sdk.kotlin.services.codedeploy.model.LifecycleEvent.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codedeploy.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Information about a deployment lifecycle event.
 */
public class LifecycleEvent private constructor(builder: Builder) {
    /**
     * Diagnostic information about the deployment lifecycle event.
     */
    public val diagnostics: aws.sdk.kotlin.services.codedeploy.model.Diagnostics? = builder.diagnostics
    /**
     * A timestamp that indicates when the deployment lifecycle event ended.
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * The deployment lifecycle event name, such as `ApplicationStop`, `BeforeInstall`, `AfterInstall`, `ApplicationStart`, or `ValidateService`.
     */
    public val lifecycleEventName: kotlin.String? = builder.lifecycleEventName
    /**
     * A timestamp that indicates when the deployment lifecycle event started.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
    /**
     * The deployment lifecycle event status:
     * + Pending: The deployment lifecycle event is pending.
     * + InProgress: The deployment lifecycle event is in progress.
     * + Succeeded: The deployment lifecycle event ran successfully.
     * + Failed: The deployment lifecycle event has failed.
     * + Skipped: The deployment lifecycle event has been skipped.
     * + Unknown: The deployment lifecycle event is unknown.
     */
    public val status: aws.sdk.kotlin.services.codedeploy.model.LifecycleEventStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("LifecycleEvent(")
        append("diagnostics=$diagnostics,")
        append("endTime=$endTime,")
        append("lifecycleEventName=$lifecycleEventName,")
        append("startTime=$startTime,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = diagnostics?.hashCode() ?: 0
        result = 31 * result + (endTime?.hashCode() ?: 0)
        result = 31 * result + (lifecycleEventName?.hashCode() ?: 0)
        result = 31 * result + (startTime?.hashCode() ?: 0)
        result = 31 * result + (status?.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 LifecycleEvent

        if (diagnostics != other.diagnostics) return false
        if (endTime != other.endTime) return false
        if (lifecycleEventName != other.lifecycleEventName) return false
        if (startTime != other.startTime) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Diagnostic information about the deployment lifecycle event.
         */
        public var diagnostics: aws.sdk.kotlin.services.codedeploy.model.Diagnostics? = null
        /**
         * A timestamp that indicates when the deployment lifecycle event ended.
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The deployment lifecycle event name, such as `ApplicationStop`, `BeforeInstall`, `AfterInstall`, `ApplicationStart`, or `ValidateService`.
         */
        public var lifecycleEventName: kotlin.String? = null
        /**
         * A timestamp that indicates when the deployment lifecycle event started.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The deployment lifecycle event status:
         * + Pending: The deployment lifecycle event is pending.
         * + InProgress: The deployment lifecycle event is in progress.
         * + Succeeded: The deployment lifecycle event ran successfully.
         * + Failed: The deployment lifecycle event has failed.
         * + Skipped: The deployment lifecycle event has been skipped.
         * + Unknown: The deployment lifecycle event is unknown.
         */
        public var status: aws.sdk.kotlin.services.codedeploy.model.LifecycleEventStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.LifecycleEvent) : this() {
            this.diagnostics = x.diagnostics
            this.endTime = x.endTime
            this.lifecycleEventName = x.lifecycleEventName
            this.startTime = x.startTime
            this.status = x.status
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy