All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.customerprofiles.model.TriggerConfig.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.customerprofiles.model



/**
 * 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 that you define. Currently, these settings only apply to the Scheduled trigger type.
     */
    public val triggerProperties: aws.sdk.kotlin.services.customerprofiles.model.TriggerProperties? = builder.triggerProperties
    /**
     * Specifies the type of flow trigger. It can be OnDemand, Scheduled, or Event.
     */
    public val triggerType: aws.sdk.kotlin.services.customerprofiles.model.TriggerType? = builder.triggerType

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.customerprofiles.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() ?: 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 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.customerprofiles.model.TriggerConfig = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Specifies the configuration details of a schedule-triggered flow that you define. Currently, these settings only apply to the Scheduled trigger type.
         */
        public var triggerProperties: aws.sdk.kotlin.services.customerprofiles.model.TriggerProperties? = null
        /**
         * Specifies the type of flow trigger. It can be OnDemand, Scheduled, or Event.
         */
        public var triggerType: aws.sdk.kotlin.services.customerprofiles.model.TriggerType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.customerprofiles.model.TriggerConfig) : this() {
            this.triggerProperties = x.triggerProperties
            this.triggerType = x.triggerType
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.customerprofiles.model.TriggerConfig = TriggerConfig(this)

        /**
         * construct an [aws.sdk.kotlin.services.customerprofiles.model.TriggerProperties] inside the given [block]
         */
        public fun triggerProperties(block: aws.sdk.kotlin.services.customerprofiles.model.TriggerProperties.Builder.() -> kotlin.Unit) {
            this.triggerProperties = aws.sdk.kotlin.services.customerprofiles.model.TriggerProperties.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy