commonMain.aws.sdk.kotlin.services.codepipeline.model.FailureConditions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepipeline-jvm Show documentation
Show all versions of codepipeline-jvm Show documentation
The AWS SDK for Kotlin client for CodePipeline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codepipeline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The configuration that specifies the result, such as rollback, to occur upon stage failure.
*/
public class FailureConditions private constructor(builder: Builder) {
/**
* The conditions that are configured as failure conditions.
*/
public val conditions: List? = builder.conditions
/**
* The specified result for when the failure conditions are met, such as rolling back the stage.
*/
public val result: aws.sdk.kotlin.services.codepipeline.model.Result? = builder.result
/**
* The retry configuration specifies automatic retry for a failed stage, along with the configured retry mode.
*/
public val retryConfiguration: aws.sdk.kotlin.services.codepipeline.model.RetryConfiguration? = builder.retryConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codepipeline.model.FailureConditions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FailureConditions(")
append("conditions=$conditions,")
append("result=$result,")
append("retryConfiguration=$retryConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = conditions?.hashCode() ?: 0
result = 31 * result + (result?.hashCode() ?: 0)
result = 31 * result + (retryConfiguration?.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 FailureConditions
if (conditions != other.conditions) return false
if (result != other.result) return false
if (retryConfiguration != other.retryConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codepipeline.model.FailureConditions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The conditions that are configured as failure conditions.
*/
public var conditions: List? = null
/**
* The specified result for when the failure conditions are met, such as rolling back the stage.
*/
public var result: aws.sdk.kotlin.services.codepipeline.model.Result? = null
/**
* The retry configuration specifies automatic retry for a failed stage, along with the configured retry mode.
*/
public var retryConfiguration: aws.sdk.kotlin.services.codepipeline.model.RetryConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.FailureConditions) : this() {
this.conditions = x.conditions
this.result = x.result
this.retryConfiguration = x.retryConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codepipeline.model.FailureConditions = FailureConditions(this)
/**
* construct an [aws.sdk.kotlin.services.codepipeline.model.RetryConfiguration] inside the given [block]
*/
public fun retryConfiguration(block: aws.sdk.kotlin.services.codepipeline.model.RetryConfiguration.Builder.() -> kotlin.Unit) {
this.retryConfiguration = aws.sdk.kotlin.services.codepipeline.model.RetryConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy