commonMain.aws.sdk.kotlin.services.pinpointemail.model.CloudWatchDestination.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointemail-jvm Show documentation
Show all versions of pinpointemail-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint Email
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointemail.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that defines an Amazon CloudWatch destination for email events. You can use Amazon CloudWatch to monitor and gain insights on your email sending metrics.
*/
public class CloudWatchDestination private constructor(builder: Builder) {
/**
* An array of objects that define the dimensions to use when you send email events to Amazon CloudWatch.
*/
public val dimensionConfigurations: List = requireNotNull(builder.dimensionConfigurations) { "A non-null value must be provided for dimensionConfigurations" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointemail.model.CloudWatchDestination = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CloudWatchDestination(")
append("dimensionConfigurations=$dimensionConfigurations")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dimensionConfigurations.hashCode()
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 CloudWatchDestination
if (dimensionConfigurations != other.dimensionConfigurations) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointemail.model.CloudWatchDestination = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of objects that define the dimensions to use when you send email events to Amazon CloudWatch.
*/
public var dimensionConfigurations: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointemail.model.CloudWatchDestination) : this() {
this.dimensionConfigurations = x.dimensionConfigurations
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointemail.model.CloudWatchDestination = CloudWatchDestination(this)
internal fun correctErrors(): Builder {
if (dimensionConfigurations == null) dimensionConfigurations = emptyList()
return this
}
}
}