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

commonMain.aws.sdk.kotlin.services.codedeploy.model.InstanceSummary.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 an instance in a deployment.
 */
@Deprecated("InstanceSummary is deprecated, use DeploymentTarget instead.")
public class InstanceSummary private constructor(builder: Builder) {
    /**
     * The unique ID of a deployment.
     */
    public val deploymentId: kotlin.String? = builder.deploymentId
    /**
     * The instance ID.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * Information about which environment an instance belongs to in a blue/green deployment.
     * + BLUE: The instance is part of the original environment.
     * + GREEN: The instance is part of the replacement environment.
     */
    public val instanceType: aws.sdk.kotlin.services.codedeploy.model.InstanceType? = builder.instanceType
    /**
     * A timestamp that indicates when the instance information was last updated.
     */
    public val lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedAt
    /**
     * A list of lifecycle events for this instance.
     */
    public val lifecycleEvents: List? = builder.lifecycleEvents
    /**
     * The deployment status for this instance:
     * + `Pending`: The deployment is pending for this instance.
     * + `In Progress`: The deployment is in progress for this instance.
     * + `Succeeded`: The deployment has succeeded for this instance.
     * + `Failed`: The deployment has failed for this instance.
     * + `Skipped`: The deployment has been skipped for this instance.
     * + `Unknown`: The deployment status is unknown for this instance.
     */
    public val status: aws.sdk.kotlin.services.codedeploy.model.InstanceStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("InstanceSummary(")
        append("deploymentId=$deploymentId,")
        append("instanceId=$instanceId,")
        append("instanceType=$instanceType,")
        append("lastUpdatedAt=$lastUpdatedAt,")
        append("lifecycleEvents=$lifecycleEvents,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deploymentId?.hashCode() ?: 0
        result = 31 * result + (instanceId?.hashCode() ?: 0)
        result = 31 * result + (instanceType?.hashCode() ?: 0)
        result = 31 * result + (lastUpdatedAt?.hashCode() ?: 0)
        result = 31 * result + (lifecycleEvents?.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 InstanceSummary

        if (deploymentId != other.deploymentId) return false
        if (instanceId != other.instanceId) return false
        if (instanceType != other.instanceType) return false
        if (lastUpdatedAt != other.lastUpdatedAt) return false
        if (lifecycleEvents != other.lifecycleEvents) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique ID of a deployment.
         */
        public var deploymentId: kotlin.String? = null
        /**
         * The instance ID.
         */
        public var instanceId: kotlin.String? = null
        /**
         * Information about which environment an instance belongs to in a blue/green deployment.
         * + BLUE: The instance is part of the original environment.
         * + GREEN: The instance is part of the replacement environment.
         */
        public var instanceType: aws.sdk.kotlin.services.codedeploy.model.InstanceType? = null
        /**
         * A timestamp that indicates when the instance information was last updated.
         */
        public var lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A list of lifecycle events for this instance.
         */
        public var lifecycleEvents: List? = null
        /**
         * The deployment status for this instance:
         * + `Pending`: The deployment is pending for this instance.
         * + `In Progress`: The deployment is in progress for this instance.
         * + `Succeeded`: The deployment has succeeded for this instance.
         * + `Failed`: The deployment has failed for this instance.
         * + `Skipped`: The deployment has been skipped for this instance.
         * + `Unknown`: The deployment status is unknown for this instance.
         */
        public var status: aws.sdk.kotlin.services.codedeploy.model.InstanceStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.InstanceSummary) : this() {
            this.deploymentId = x.deploymentId
            this.instanceId = x.instanceId
            this.instanceType = x.instanceType
            this.lastUpdatedAt = x.lastUpdatedAt
            this.lifecycleEvents = x.lifecycleEvents
            this.status = x.status
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy