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

commonMain.aws.sdk.kotlin.services.eventbridge.model.ReplayDestination.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.eventbridge.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A `ReplayDestination` object that contains details about a replay.
 */
public class ReplayDestination private constructor(builder: Builder) {
    /**
     * The ARN of the event bus to replay event to. You can replay events only to the event bus specified to create the archive.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * A list of ARNs for rules to replay events to.
     */
    public val filterArns: List? = builder.filterArns

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

    override fun toString(): kotlin.String = buildString {
        append("ReplayDestination(")
        append("arn=$arn,")
        append("filterArns=$filterArns")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (filterArns?.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 ReplayDestination

        if (arn != other.arn) return false
        if (filterArns != other.filterArns) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the event bus to replay event to. You can replay events only to the event bus specified to create the archive.
         */
        public var arn: kotlin.String? = null
        /**
         * A list of ARNs for rules to replay events to.
         */
        public var filterArns: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.ReplayDestination) : this() {
            this.arn = x.arn
            this.filterArns = x.filterArns
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy