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

commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.StartReplayRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudwatchevents.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class StartReplayRequest private constructor(builder: Builder) {
    /**
     * A description for the replay to start.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A `ReplayDestination` object that includes details about the destination for the replay.
     */
    public val destination: aws.sdk.kotlin.services.cloudwatchevents.model.ReplayDestination? = builder.destination
    /**
     * A time stamp for the time to stop replaying events. Only events that occurred between the `EventStartTime` and `EventEndTime` are replayed.
     */
    public val eventEndTime: aws.smithy.kotlin.runtime.time.Instant? = builder.eventEndTime
    /**
     * The ARN of the archive to replay events from.
     */
    public val eventSourceArn: kotlin.String? = builder.eventSourceArn
    /**
     * A time stamp for the time to start replaying events. Only events that occurred between the `EventStartTime` and `EventEndTime` are replayed.
     */
    public val eventStartTime: aws.smithy.kotlin.runtime.time.Instant? = builder.eventStartTime
    /**
     * The name of the replay to start.
     */
    public val replayName: kotlin.String? = builder.replayName

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

    override fun toString(): kotlin.String = buildString {
        append("StartReplayRequest(")
        append("description=$description,")
        append("destination=$destination,")
        append("eventEndTime=$eventEndTime,")
        append("eventSourceArn=$eventSourceArn,")
        append("eventStartTime=$eventStartTime,")
        append("replayName=$replayName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (destination?.hashCode() ?: 0)
        result = 31 * result + (eventEndTime?.hashCode() ?: 0)
        result = 31 * result + (eventSourceArn?.hashCode() ?: 0)
        result = 31 * result + (eventStartTime?.hashCode() ?: 0)
        result = 31 * result + (replayName?.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 StartReplayRequest

        if (description != other.description) return false
        if (destination != other.destination) return false
        if (eventEndTime != other.eventEndTime) return false
        if (eventSourceArn != other.eventSourceArn) return false
        if (eventStartTime != other.eventStartTime) return false
        if (replayName != other.replayName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A description for the replay to start.
         */
        public var description: kotlin.String? = null
        /**
         * A `ReplayDestination` object that includes details about the destination for the replay.
         */
        public var destination: aws.sdk.kotlin.services.cloudwatchevents.model.ReplayDestination? = null
        /**
         * A time stamp for the time to stop replaying events. Only events that occurred between the `EventStartTime` and `EventEndTime` are replayed.
         */
        public var eventEndTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN of the archive to replay events from.
         */
        public var eventSourceArn: kotlin.String? = null
        /**
         * A time stamp for the time to start replaying events. Only events that occurred between the `EventStartTime` and `EventEndTime` are replayed.
         */
        public var eventStartTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the replay to start.
         */
        public var replayName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.StartReplayRequest) : this() {
            this.description = x.description
            this.destination = x.destination
            this.eventEndTime = x.eventEndTime
            this.eventSourceArn = x.eventSourceArn
            this.eventStartTime = x.eventStartTime
            this.replayName = x.replayName
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy