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

commonMain.aws.sdk.kotlin.services.appconfig.model.DeploymentSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appconfig.model

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

/**
 * Information about the deployment.
 */
public class DeploymentSummary private constructor(builder: Builder) {
    /**
     * Time the deployment completed.
     */
    public val completedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.completedAt
    /**
     * The name of the configuration.
     */
    public val configurationName: kotlin.String? = builder.configurationName
    /**
     * The version of the configuration.
     */
    public val configurationVersion: kotlin.String? = builder.configurationVersion
    /**
     * Total amount of time the deployment lasted.
     */
    public val deploymentDurationInMinutes: kotlin.Int = builder.deploymentDurationInMinutes
    /**
     * The sequence number of the deployment.
     */
    public val deploymentNumber: kotlin.Int = builder.deploymentNumber
    /**
     * The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.
     */
    public val finalBakeTimeInMinutes: kotlin.Int = builder.finalBakeTimeInMinutes
    /**
     * The percentage of targets to receive a deployed configuration during each interval.
     */
    public val growthFactor: kotlin.Float? = builder.growthFactor
    /**
     * The algorithm used to define how percentage grows over time.
     */
    public val growthType: aws.sdk.kotlin.services.appconfig.model.GrowthType? = builder.growthType
    /**
     * The percentage of targets for which the deployment is available.
     */
    public val percentageComplete: kotlin.Float? = builder.percentageComplete
    /**
     * Time the deployment started.
     */
    public val startedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.startedAt
    /**
     * The state of the deployment.
     */
    public val state: aws.sdk.kotlin.services.appconfig.model.DeploymentState? = builder.state
    /**
     * A user-defined label for an AppConfig hosted configuration version.
     */
    public val versionLabel: kotlin.String? = builder.versionLabel

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

    override fun toString(): kotlin.String = buildString {
        append("DeploymentSummary(")
        append("completedAt=$completedAt,")
        append("configurationName=$configurationName,")
        append("configurationVersion=$configurationVersion,")
        append("deploymentDurationInMinutes=$deploymentDurationInMinutes,")
        append("deploymentNumber=$deploymentNumber,")
        append("finalBakeTimeInMinutes=$finalBakeTimeInMinutes,")
        append("growthFactor=$growthFactor,")
        append("growthType=$growthType,")
        append("percentageComplete=$percentageComplete,")
        append("startedAt=$startedAt,")
        append("state=$state,")
        append("versionLabel=$versionLabel")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = completedAt?.hashCode() ?: 0
        result = 31 * result + (configurationName?.hashCode() ?: 0)
        result = 31 * result + (configurationVersion?.hashCode() ?: 0)
        result = 31 * result + (deploymentDurationInMinutes)
        result = 31 * result + (deploymentNumber)
        result = 31 * result + (finalBakeTimeInMinutes)
        result = 31 * result + (growthFactor?.hashCode() ?: 0)
        result = 31 * result + (growthType?.hashCode() ?: 0)
        result = 31 * result + (percentageComplete?.hashCode() ?: 0)
        result = 31 * result + (startedAt?.hashCode() ?: 0)
        result = 31 * result + (state?.hashCode() ?: 0)
        result = 31 * result + (versionLabel?.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 DeploymentSummary

        if (completedAt != other.completedAt) return false
        if (configurationName != other.configurationName) return false
        if (configurationVersion != other.configurationVersion) return false
        if (deploymentDurationInMinutes != other.deploymentDurationInMinutes) return false
        if (deploymentNumber != other.deploymentNumber) return false
        if (finalBakeTimeInMinutes != other.finalBakeTimeInMinutes) return false
        if (!(growthFactor?.equals(other.growthFactor) ?: (other.growthFactor == null))) return false
        if (growthType != other.growthType) return false
        if (!(percentageComplete?.equals(other.percentageComplete) ?: (other.percentageComplete == null))) return false
        if (startedAt != other.startedAt) return false
        if (state != other.state) return false
        if (versionLabel != other.versionLabel) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Time the deployment completed.
         */
        public var completedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the configuration.
         */
        public var configurationName: kotlin.String? = null
        /**
         * The version of the configuration.
         */
        public var configurationVersion: kotlin.String? = null
        /**
         * Total amount of time the deployment lasted.
         */
        public var deploymentDurationInMinutes: kotlin.Int = 0
        /**
         * The sequence number of the deployment.
         */
        public var deploymentNumber: kotlin.Int = 0
        /**
         * The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.
         */
        public var finalBakeTimeInMinutes: kotlin.Int = 0
        /**
         * The percentage of targets to receive a deployed configuration during each interval.
         */
        public var growthFactor: kotlin.Float? = null
        /**
         * The algorithm used to define how percentage grows over time.
         */
        public var growthType: aws.sdk.kotlin.services.appconfig.model.GrowthType? = null
        /**
         * The percentage of targets for which the deployment is available.
         */
        public var percentageComplete: kotlin.Float? = null
        /**
         * Time the deployment started.
         */
        public var startedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The state of the deployment.
         */
        public var state: aws.sdk.kotlin.services.appconfig.model.DeploymentState? = null
        /**
         * A user-defined label for an AppConfig hosted configuration version.
         */
        public var versionLabel: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appconfig.model.DeploymentSummary) : this() {
            this.completedAt = x.completedAt
            this.configurationName = x.configurationName
            this.configurationVersion = x.configurationVersion
            this.deploymentDurationInMinutes = x.deploymentDurationInMinutes
            this.deploymentNumber = x.deploymentNumber
            this.finalBakeTimeInMinutes = x.finalBakeTimeInMinutes
            this.growthFactor = x.growthFactor
            this.growthType = x.growthType
            this.percentageComplete = x.percentageComplete
            this.startedAt = x.startedAt
            this.state = x.state
            this.versionLabel = x.versionLabel
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy