commonMain.aws.sdk.kotlin.services.pinpointsmsvoice.model.EventDestination.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoice-jvm Show documentation
Show all versions of pinpointsmsvoice-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice
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 an event destination.
*/
public class EventDestination 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
/**
* A name that identifies the event destination configuration.
*/
public val name: kotlin.String? = builder.name
/**
* 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.EventDestination = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EventDestination(")
append("cloudWatchLogsDestination=$cloudWatchLogsDestination,")
append("enabled=$enabled,")
append("kinesisFirehoseDestination=$kinesisFirehoseDestination,")
append("matchingEventTypes=$matchingEventTypes,")
append("name=$name,")
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 + (name?.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 EventDestination
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 (name != other.name) return false
if (snsDestination != other.snsDestination) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoice.model.EventDestination = 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
/**
* A name that identifies the event destination configuration.
*/
public var name: kotlin.String? = 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.EventDestination) : this() {
this.cloudWatchLogsDestination = x.cloudWatchLogsDestination
this.enabled = x.enabled
this.kinesisFirehoseDestination = x.kinesisFirehoseDestination
this.matchingEventTypes = x.matchingEventTypes
this.name = x.name
this.snsDestination = x.snsDestination
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoice.model.EventDestination = EventDestination(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
}
}
}