commonMain.aws.sdk.kotlin.services.codepipeline.model.Condition.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 condition for the stage. A condition is made up of the rules and the result for the condition.
*/
public class Condition private constructor(builder: Builder) {
/**
* The action to be done when the condition is met. For example, rolling back an execution for a failure condition.
*/
public val result: aws.sdk.kotlin.services.codepipeline.model.Result? = builder.result
/**
* The rules that make up the condition.
*/
public val rules: List? = builder.rules
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codepipeline.model.Condition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Condition(")
append("result=$result,")
append("rules=$rules")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = result?.hashCode() ?: 0
result = 31 * result + (rules?.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 Condition
if (result != other.result) return false
if (rules != other.rules) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codepipeline.model.Condition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The action to be done when the condition is met. For example, rolling back an execution for a failure condition.
*/
public var result: aws.sdk.kotlin.services.codepipeline.model.Result? = null
/**
* The rules that make up the condition.
*/
public var rules: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.Condition) : this() {
this.result = x.result
this.rules = x.rules
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codepipeline.model.Condition = Condition(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy