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

commonMain.aws.sdk.kotlin.services.codedeploy.model.StopDeploymentRequest.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

/**
 * Represents the input of a `StopDeployment` operation.
 */
public class StopDeploymentRequest private constructor(builder: Builder) {
    /**
     * Indicates, when a deployment is stopped, whether instances that have been updated should be rolled back to the previous version of the application revision.
     */
    public val autoRollbackEnabled: kotlin.Boolean? = builder.autoRollbackEnabled
    /**
     * The unique ID of a deployment.
     */
    public val deploymentId: kotlin.String? = builder.deploymentId

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

    override fun toString(): kotlin.String = buildString {
        append("StopDeploymentRequest(")
        append("autoRollbackEnabled=$autoRollbackEnabled,")
        append("deploymentId=$deploymentId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoRollbackEnabled?.hashCode() ?: 0
        result = 31 * result + (deploymentId?.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 StopDeploymentRequest

        if (autoRollbackEnabled != other.autoRollbackEnabled) return false
        if (deploymentId != other.deploymentId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates, when a deployment is stopped, whether instances that have been updated should be rolled back to the previous version of the application revision.
         */
        public var autoRollbackEnabled: kotlin.Boolean? = null
        /**
         * The unique ID of a deployment.
         */
        public var deploymentId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.StopDeploymentRequest) : this() {
            this.autoRollbackEnabled = x.autoRollbackEnabled
            this.deploymentId = x.deploymentId
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy