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

commonMain.aws.sdk.kotlin.services.swf.model.ScheduleLambdaFunctionDecisionAttributes.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.swf.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Decision attributes specified in `scheduleLambdaFunctionDecisionAttributes` within the list of decisions `decisions` passed to RespondDecisionTaskCompleted.
 */
public class ScheduleLambdaFunctionDecisionAttributes private constructor(builder: Builder) {
    /**
     * The data attached to the event that the decider can use in subsequent workflow tasks. This data isn't sent to the Lambda task.
     */
    public val control: kotlin.String? = builder.control
    /**
     * A string that identifies the Lambda function execution in the event history.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The optional input data to be supplied to the Lambda function.
     */
    public val input: kotlin.String? = builder.input
    /**
     * The name, or ARN, of the Lambda function to schedule.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The timeout value, in seconds, after which the Lambda function is considered to be failed once it has started. This can be any integer from 1-900 (1s-15m).
     *
     * If no value is supplied, then a default value of 900s is assumed.
     */
    public val startToCloseTimeout: kotlin.String? = builder.startToCloseTimeout

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.swf.model.ScheduleLambdaFunctionDecisionAttributes = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ScheduleLambdaFunctionDecisionAttributes(")
        append("control=$control,")
        append("id=$id,")
        append("input=$input,")
        append("name=$name,")
        append("startToCloseTimeout=$startToCloseTimeout")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = control?.hashCode() ?: 0
        result = 31 * result + (id.hashCode())
        result = 31 * result + (input?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (startToCloseTimeout?.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 ScheduleLambdaFunctionDecisionAttributes

        if (control != other.control) return false
        if (id != other.id) return false
        if (input != other.input) return false
        if (name != other.name) return false
        if (startToCloseTimeout != other.startToCloseTimeout) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.swf.model.ScheduleLambdaFunctionDecisionAttributes = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The data attached to the event that the decider can use in subsequent workflow tasks. This data isn't sent to the Lambda task.
         */
        public var control: kotlin.String? = null
        /**
         * A string that identifies the Lambda function execution in the event history.
         */
        public var id: kotlin.String? = null
        /**
         * The optional input data to be supplied to the Lambda function.
         */
        public var input: kotlin.String? = null
        /**
         * The name, or ARN, of the Lambda function to schedule.
         */
        public var name: kotlin.String? = null
        /**
         * The timeout value, in seconds, after which the Lambda function is considered to be failed once it has started. This can be any integer from 1-900 (1s-15m).
         *
         * If no value is supplied, then a default value of 900s is assumed.
         */
        public var startToCloseTimeout: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.ScheduleLambdaFunctionDecisionAttributes) : this() {
            this.control = x.control
            this.id = x.id
            this.input = x.input
            this.name = x.name
            this.startToCloseTimeout = x.startToCloseTimeout
        }

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

        internal fun correctErrors(): Builder {
            if (id == null) id = ""
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy