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

commonMain.aws.sdk.kotlin.services.swf.model.TimerFiredEventAttributes.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

/**
 * Provides the details of the `TimerFired` event.
 */
public class TimerFiredEventAttributes private constructor(builder: Builder) {
    /**
     * The ID of the `TimerStarted` event that was recorded when this timer was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
     */
    public val startedEventId: kotlin.Long = builder.startedEventId
    /**
     * The unique ID of the timer that fired.
     */
    public val timerId: kotlin.String = requireNotNull(builder.timerId) { "A non-null value must be provided for timerId" }

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

    override fun toString(): kotlin.String = buildString {
        append("TimerFiredEventAttributes(")
        append("startedEventId=$startedEventId,")
        append("timerId=$timerId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = startedEventId.hashCode()
        result = 31 * result + (timerId.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 TimerFiredEventAttributes

        if (startedEventId != other.startedEventId) return false
        if (timerId != other.timerId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the `TimerStarted` event that was recorded when this timer was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
         */
        public var startedEventId: kotlin.Long = 0L
        /**
         * The unique ID of the timer that fired.
         */
        public var timerId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.TimerFiredEventAttributes) : this() {
            this.startedEventId = x.startedEventId
            this.timerId = x.timerId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy