commonMain.aws.sdk.kotlin.services.glue.model.Predicate.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Defines the predicate of the trigger, which determines when it fires.
*/
public class Predicate private constructor(builder: Builder) {
/**
* A list of the conditions that determine when the trigger will fire.
*/
public val conditions: List? = builder.conditions
/**
* An optional field if only one condition is listed. If multiple conditions are listed, then this field is required.
*/
public val logical: aws.sdk.kotlin.services.glue.model.Logical? = builder.logical
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Predicate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Predicate(")
append("conditions=$conditions,")
append("logical=$logical")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = conditions?.hashCode() ?: 0
result = 31 * result + (logical?.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 Predicate
if (conditions != other.conditions) return false
if (logical != other.logical) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Predicate = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of the conditions that determine when the trigger will fire.
*/
public var conditions: List? = null
/**
* An optional field if only one condition is listed. If multiple conditions are listed, then this field is required.
*/
public var logical: aws.sdk.kotlin.services.glue.model.Logical? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Predicate) : this() {
this.conditions = x.conditions
this.logical = x.logical
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Predicate = Predicate(this)
internal fun correctErrors(): Builder {
return this
}
}
}