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

commonMain.aws.sdk.kotlin.services.datazone.model.Deployment.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.datazone.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The details of the last deployment of the environment.
 */
public class Deployment private constructor(builder: Builder) {
    /**
     * The identifier of the last deployment of the environment.
     */
    public val deploymentId: kotlin.String? = builder.deploymentId
    /**
     * The status of the last deployment of the environment.
     */
    public val deploymentStatus: aws.sdk.kotlin.services.datazone.model.DeploymentStatus? = builder.deploymentStatus
    /**
     * The type of the last deployment of the environment.
     */
    public val deploymentType: aws.sdk.kotlin.services.datazone.model.DeploymentType? = builder.deploymentType
    /**
     * The failure reason of the last deployment of the environment.
     */
    public val failureReason: aws.sdk.kotlin.services.datazone.model.EnvironmentError? = builder.failureReason
    /**
     * Specifies whether the last deployment of the environment is complete.
     */
    public val isDeploymentComplete: kotlin.Boolean? = builder.isDeploymentComplete
    /**
     * The messages of the last deployment of the environment.
     */
    public val messages: List? = builder.messages

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

    override fun toString(): kotlin.String = buildString {
        append("Deployment(")
        append("deploymentId=$deploymentId,")
        append("deploymentStatus=$deploymentStatus,")
        append("deploymentType=$deploymentType,")
        append("failureReason=$failureReason,")
        append("isDeploymentComplete=$isDeploymentComplete,")
        append("messages=$messages")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deploymentId?.hashCode() ?: 0
        result = 31 * result + (deploymentStatus?.hashCode() ?: 0)
        result = 31 * result + (deploymentType?.hashCode() ?: 0)
        result = 31 * result + (failureReason?.hashCode() ?: 0)
        result = 31 * result + (isDeploymentComplete?.hashCode() ?: 0)
        result = 31 * result + (messages?.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 Deployment

        if (deploymentId != other.deploymentId) return false
        if (deploymentStatus != other.deploymentStatus) return false
        if (deploymentType != other.deploymentType) return false
        if (failureReason != other.failureReason) return false
        if (isDeploymentComplete != other.isDeploymentComplete) return false
        if (messages != other.messages) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The identifier of the last deployment of the environment.
         */
        public var deploymentId: kotlin.String? = null
        /**
         * The status of the last deployment of the environment.
         */
        public var deploymentStatus: aws.sdk.kotlin.services.datazone.model.DeploymentStatus? = null
        /**
         * The type of the last deployment of the environment.
         */
        public var deploymentType: aws.sdk.kotlin.services.datazone.model.DeploymentType? = null
        /**
         * The failure reason of the last deployment of the environment.
         */
        public var failureReason: aws.sdk.kotlin.services.datazone.model.EnvironmentError? = null
        /**
         * Specifies whether the last deployment of the environment is complete.
         */
        public var isDeploymentComplete: kotlin.Boolean? = null
        /**
         * The messages of the last deployment of the environment.
         */
        public var messages: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.Deployment) : this() {
            this.deploymentId = x.deploymentId
            this.deploymentStatus = x.deploymentStatus
            this.deploymentType = x.deploymentType
            this.failureReason = x.failureReason
            this.isDeploymentComplete = x.isDeploymentComplete
            this.messages = x.messages
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy