commonMain.aws.sdk.kotlin.services.appflow.model.TriggerConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appflow-jvm Show documentation
Show all versions of appflow-jvm Show documentation
The AWS SDK for Kotlin client for Appflow
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appflow.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The trigger settings that determine how and when Amazon AppFlow runs the specified flow.
*/
public class TriggerConfig private constructor(builder: Builder) {
/**
* Specifies the configuration details of a schedule-triggered flow as defined by the user. Currently, these settings only apply to the `Scheduled` trigger type.
*/
public val triggerProperties: aws.sdk.kotlin.services.appflow.model.TriggerProperties? = builder.triggerProperties
/**
* Specifies the type of flow trigger. This can be `OnDemand`, `Scheduled`, or `Event`.
*/
public val triggerType: aws.sdk.kotlin.services.appflow.model.TriggerType = requireNotNull(builder.triggerType) { "A non-null value must be provided for triggerType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appflow.model.TriggerConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TriggerConfig(")
append("triggerProperties=$triggerProperties,")
append("triggerType=$triggerType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = triggerProperties?.hashCode() ?: 0
result = 31 * result + (triggerType.hashCode())
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 TriggerConfig
if (triggerProperties != other.triggerProperties) return false
if (triggerType != other.triggerType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appflow.model.TriggerConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the configuration details of a schedule-triggered flow as defined by the user. Currently, these settings only apply to the `Scheduled` trigger type.
*/
public var triggerProperties: aws.sdk.kotlin.services.appflow.model.TriggerProperties? = null
/**
* Specifies the type of flow trigger. This can be `OnDemand`, `Scheduled`, or `Event`.
*/
public var triggerType: aws.sdk.kotlin.services.appflow.model.TriggerType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appflow.model.TriggerConfig) : this() {
this.triggerProperties = x.triggerProperties
this.triggerType = x.triggerType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appflow.model.TriggerConfig = TriggerConfig(this)
/**
* construct an [aws.sdk.kotlin.services.appflow.model.TriggerProperties] inside the given [block]
*/
public fun triggerProperties(block: aws.sdk.kotlin.services.appflow.model.TriggerProperties.Builder.() -> kotlin.Unit) {
this.triggerProperties = aws.sdk.kotlin.services.appflow.model.TriggerProperties.invoke(block)
}
internal fun correctErrors(): Builder {
if (triggerType == null) triggerType = TriggerType.SdkUnknown("no value provided")
return this
}
}
}