commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateEventDestinationRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoicev2-jvm Show documentation
Show all versions of pinpointsmsvoicev2-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice V2
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointsmsvoicev2.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateEventDestinationRequest private constructor(builder: Builder) {
/**
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* An object that contains information about an event destination for logging to Amazon CloudWatch Logs.
*/
public val cloudWatchLogsDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CloudWatchLogsDestination? = builder.cloudWatchLogsDestination
/**
* Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.
*/
public val configurationSetName: kotlin.String? = builder.configurationSetName
/**
* The name that identifies the event destination.
*/
public val eventDestinationName: kotlin.String? = builder.eventDestinationName
/**
* An object that contains information about an event destination for logging to Amazon Data Firehose.
*/
public val kinesisFirehoseDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.KinesisFirehoseDestination? = builder.kinesisFirehoseDestination
/**
* An array of event types that determine which events to log. If "ALL" is used, then AWS End User Messaging SMS and Voice logs every event type.
*
* The `TEXT_SENT` event type is not supported.
*/
public val matchingEventTypes: List? = builder.matchingEventTypes
/**
* An object that contains information about an event destination for logging 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.CreateEventDestinationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateEventDestinationRequest(")
append("clientToken=$clientToken,")
append("cloudWatchLogsDestination=$cloudWatchLogsDestination,")
append("configurationSetName=$configurationSetName,")
append("eventDestinationName=$eventDestinationName,")
append("kinesisFirehoseDestination=$kinesisFirehoseDestination,")
append("matchingEventTypes=$matchingEventTypes,")
append("snsDestination=$snsDestination")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (cloudWatchLogsDestination?.hashCode() ?: 0)
result = 31 * result + (configurationSetName?.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 CreateEventDestinationRequest
if (clientToken != other.clientToken) return false
if (cloudWatchLogsDestination != other.cloudWatchLogsDestination) return false
if (configurationSetName != other.configurationSetName) 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.CreateEventDestinationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
*/
public var clientToken: kotlin.String? = null
/**
* An object that contains information about an event destination for logging to Amazon CloudWatch Logs.
*/
public var cloudWatchLogsDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CloudWatchLogsDestination? = null
/**
* Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.
*/
public var configurationSetName: kotlin.String? = null
/**
* The name that identifies the event destination.
*/
public var eventDestinationName: kotlin.String? = null
/**
* An object that contains information about an event destination for logging to Amazon Data Firehose.
*/
public var kinesisFirehoseDestination: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.KinesisFirehoseDestination? = null
/**
* An array of event types that determine which events to log. If "ALL" is used, then AWS End User Messaging SMS and Voice logs every event type.
*
* The `TEXT_SENT` event type is not supported.
*/
public var matchingEventTypes: List? = null
/**
* An object that contains information about an event destination for logging 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.CreateEventDestinationRequest) : this() {
this.clientToken = x.clientToken
this.cloudWatchLogsDestination = x.cloudWatchLogsDestination
this.configurationSetName = x.configurationSetName
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.CreateEventDestinationRequest = CreateEventDestinationRequest(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
}
}
}