commonMain.aws.sdk.kotlin.services.codedeploy.model.BlueGreenDeploymentConfiguration.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 blue/green deployment options for a deployment group.
*/
public class BlueGreenDeploymentConfiguration private constructor(builder: Builder) {
/**
* Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
*/
public val deploymentReadyOption: aws.sdk.kotlin.services.codedeploy.model.DeploymentReadyOption? = builder.deploymentReadyOption
/**
* Information about how instances are provisioned for a replacement environment in a blue/green deployment.
*/
public val greenFleetProvisioningOption: aws.sdk.kotlin.services.codedeploy.model.GreenFleetProvisioningOption? = builder.greenFleetProvisioningOption
/**
* Information about whether to terminate instances in the original fleet during a blue/green deployment.
*/
public val terminateBlueInstancesOnDeploymentSuccess: aws.sdk.kotlin.services.codedeploy.model.BlueInstanceTerminationOption? = builder.terminateBlueInstancesOnDeploymentSuccess
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codedeploy.model.BlueGreenDeploymentConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BlueGreenDeploymentConfiguration(")
append("deploymentReadyOption=$deploymentReadyOption,")
append("greenFleetProvisioningOption=$greenFleetProvisioningOption,")
append("terminateBlueInstancesOnDeploymentSuccess=$terminateBlueInstancesOnDeploymentSuccess")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deploymentReadyOption?.hashCode() ?: 0
result = 31 * result + (greenFleetProvisioningOption?.hashCode() ?: 0)
result = 31 * result + (terminateBlueInstancesOnDeploymentSuccess?.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 BlueGreenDeploymentConfiguration
if (deploymentReadyOption != other.deploymentReadyOption) return false
if (greenFleetProvisioningOption != other.greenFleetProvisioningOption) return false
if (terminateBlueInstancesOnDeploymentSuccess != other.terminateBlueInstancesOnDeploymentSuccess) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codedeploy.model.BlueGreenDeploymentConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
*/
public var deploymentReadyOption: aws.sdk.kotlin.services.codedeploy.model.DeploymentReadyOption? = null
/**
* Information about how instances are provisioned for a replacement environment in a blue/green deployment.
*/
public var greenFleetProvisioningOption: aws.sdk.kotlin.services.codedeploy.model.GreenFleetProvisioningOption? = null
/**
* Information about whether to terminate instances in the original fleet during a blue/green deployment.
*/
public var terminateBlueInstancesOnDeploymentSuccess: aws.sdk.kotlin.services.codedeploy.model.BlueInstanceTerminationOption? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.BlueGreenDeploymentConfiguration) : this() {
this.deploymentReadyOption = x.deploymentReadyOption
this.greenFleetProvisioningOption = x.greenFleetProvisioningOption
this.terminateBlueInstancesOnDeploymentSuccess = x.terminateBlueInstancesOnDeploymentSuccess
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codedeploy.model.BlueGreenDeploymentConfiguration = BlueGreenDeploymentConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.codedeploy.model.DeploymentReadyOption] inside the given [block]
*/
public fun deploymentReadyOption(block: aws.sdk.kotlin.services.codedeploy.model.DeploymentReadyOption.Builder.() -> kotlin.Unit) {
this.deploymentReadyOption = aws.sdk.kotlin.services.codedeploy.model.DeploymentReadyOption.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codedeploy.model.GreenFleetProvisioningOption] inside the given [block]
*/
public fun greenFleetProvisioningOption(block: aws.sdk.kotlin.services.codedeploy.model.GreenFleetProvisioningOption.Builder.() -> kotlin.Unit) {
this.greenFleetProvisioningOption = aws.sdk.kotlin.services.codedeploy.model.GreenFleetProvisioningOption.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codedeploy.model.BlueInstanceTerminationOption] inside the given [block]
*/
public fun terminateBlueInstancesOnDeploymentSuccess(block: aws.sdk.kotlin.services.codedeploy.model.BlueInstanceTerminationOption.Builder.() -> kotlin.Unit) {
this.terminateBlueInstancesOnDeploymentSuccess = aws.sdk.kotlin.services.codedeploy.model.BlueInstanceTerminationOption.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}