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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoice.model.EventDestinationDefinition.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pinpointsmsvoice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An object that defines a single event destination.
 */
public class EventDestinationDefinition private constructor(builder: Builder) {
    /**
     * An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
     */
    public val cloudWatchLogsDestination: aws.sdk.kotlin.services.pinpointsmsvoice.model.CloudWatchLogsDestination? = builder.cloudWatchLogsDestination
    /**
     * Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
     */
    public val kinesisFirehoseDestination: aws.sdk.kotlin.services.pinpointsmsvoice.model.KinesisFirehoseDestination? = builder.kinesisFirehoseDestination
    /**
     * An array of EventDestination objects. Each EventDestination object includes ARNs and other information that define an event destination.
     */
    public val matchingEventTypes: List? = builder.matchingEventTypes
    /**
     * An object that contains information about an event destination that sends data to Amazon SNS.
     */
    public val snsDestination: aws.sdk.kotlin.services.pinpointsmsvoice.model.SnsDestination? = builder.snsDestination

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

    override fun toString(): kotlin.String = buildString {
        append("EventDestinationDefinition(")
        append("cloudWatchLogsDestination=$cloudWatchLogsDestination,")
        append("enabled=$enabled,")
        append("kinesisFirehoseDestination=$kinesisFirehoseDestination,")
        append("matchingEventTypes=$matchingEventTypes,")
        append("snsDestination=$snsDestination")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cloudWatchLogsDestination?.hashCode() ?: 0
        result = 31 * result + (enabled?.hashCode() ?: 0)
        result = 31 * result + (kinesisFirehoseDestination?.hashCode() ?: 0)
        result = 31 * result + (matchingEventTypes?.hashCode() ?: 0)
        result = 31 * result + (snsDestination?.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 EventDestinationDefinition

        if (cloudWatchLogsDestination != other.cloudWatchLogsDestination) return false
        if (enabled != other.enabled) return false
        if (kinesisFirehoseDestination != other.kinesisFirehoseDestination) return false
        if (matchingEventTypes != other.matchingEventTypes) return false
        if (snsDestination != other.snsDestination) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
         */
        public var cloudWatchLogsDestination: aws.sdk.kotlin.services.pinpointsmsvoice.model.CloudWatchLogsDestination? = null
        /**
         * Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
         */
        public var kinesisFirehoseDestination: aws.sdk.kotlin.services.pinpointsmsvoice.model.KinesisFirehoseDestination? = null
        /**
         * An array of EventDestination objects. Each EventDestination object includes ARNs and other information that define an event destination.
         */
        public var matchingEventTypes: List? = null
        /**
         * An object that contains information about an event destination that sends data to Amazon SNS.
         */
        public var snsDestination: aws.sdk.kotlin.services.pinpointsmsvoice.model.SnsDestination? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoice.model.EventDestinationDefinition) : this() {
            this.cloudWatchLogsDestination = x.cloudWatchLogsDestination
            this.enabled = x.enabled
            this.kinesisFirehoseDestination = x.kinesisFirehoseDestination
            this.matchingEventTypes = x.matchingEventTypes
            this.snsDestination = x.snsDestination
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy