commonMain.aws.sdk.kotlin.services.codedeploy.model.AutoRollbackConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codedeploy-jvm Show documentation
Show all versions of codedeploy-jvm Show documentation
The AWS SDK for Kotlin client for CodeDeploy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codedeploy.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about a configuration for automatically rolling back to a previous version of an application revision when a deployment is not completed successfully.
*/
public class AutoRollbackConfiguration private constructor(builder: Builder) {
/**
* Indicates whether a defined automatic rollback configuration is currently enabled.
*/
public val enabled: kotlin.Boolean = builder.enabled
/**
* The event type or types that trigger a rollback.
*/
public val events: List? = builder.events
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codedeploy.model.AutoRollbackConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AutoRollbackConfiguration(")
append("enabled=$enabled,")
append("events=$events")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enabled.hashCode()
result = 31 * result + (events?.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 AutoRollbackConfiguration
if (enabled != other.enabled) return false
if (events != other.events) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codedeploy.model.AutoRollbackConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates whether a defined automatic rollback configuration is currently enabled.
*/
public var enabled: kotlin.Boolean = false
/**
* The event type or types that trigger a rollback.
*/
public var events: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.AutoRollbackConfiguration) : this() {
this.enabled = x.enabled
this.events = x.events
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codedeploy.model.AutoRollbackConfiguration = AutoRollbackConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}