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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdateEventDestinationRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pinpointsmsvoicev2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateEventDestinationRequest private constructor(builder: Builder) {
    /**
     * An object that contains information about an event destination that sends data to CloudWatch Logs.
     */
    public val cloudWatchLogsDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CloudWatchLogsDestination? = builder.cloudWatchLogsDestination
    /**
     * The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.
     */
    public val configurationSetName: kotlin.String? = builder.configurationSetName
    /**
     * When set to true logging is enabled.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * The name to use for the event destination.
     */
    public val eventDestinationName: kotlin.String? = builder.eventDestinationName
    /**
     * An object that contains information about an event destination for logging to Firehose.
     */
    public val kinesisFirehoseDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.KinesisFirehoseDestination? = builder.kinesisFirehoseDestination
    /**
     * An array of event types that determine which events to log.
     *
     * The `TEXT_SENT` event type is not supported.
     */
    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.pinpointsmsvoicev2.model.SnsDestination? = builder.snsDestination

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

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

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

        if (cloudWatchLogsDestination != other.cloudWatchLogsDestination) return false
        if (configurationSetName != other.configurationSetName) return false
        if (enabled != other.enabled) return false
        if (eventDestinationName != other.eventDestinationName) 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.pinpointsmsvoicev2.model.UpdateEventDestinationRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An object that contains information about an event destination that sends data to CloudWatch Logs.
         */
        public var cloudWatchLogsDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CloudWatchLogsDestination? = null
        /**
         * The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.
         */
        public var configurationSetName: kotlin.String? = null
        /**
         * When set to true logging is enabled.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * The name to use for the event destination.
         */
        public var eventDestinationName: kotlin.String? = null
        /**
         * An object that contains information about an event destination for logging to Firehose.
         */
        public var kinesisFirehoseDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.KinesisFirehoseDestination? = null
        /**
         * An array of event types that determine which events to log.
         *
         * The `TEXT_SENT` event type is not supported.
         */
        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.pinpointsmsvoicev2.model.SnsDestination? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdateEventDestinationRequest) : this() {
            this.cloudWatchLogsDestination = x.cloudWatchLogsDestination
            this.configurationSetName = x.configurationSetName
            this.enabled = x.enabled
            this.eventDestinationName = x.eventDestinationName
            this.kinesisFirehoseDestination = x.kinesisFirehoseDestination
            this.matchingEventTypes = x.matchingEventTypes
            this.snsDestination = x.snsDestination
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy