commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ConfigurationSetInformation.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Information related to a given configuration set in your Amazon Web Services account.
*/
public class ConfigurationSetInformation private constructor(builder: Builder) {
/**
* The Resource Name (ARN) of the ConfigurationSet.
*/
public val configurationSetArn: kotlin.String = requireNotNull(builder.configurationSetArn) { "A non-null value must be provided for configurationSetArn" }
/**
* The name of the ConfigurationSet.
*/
public val configurationSetName: kotlin.String = requireNotNull(builder.configurationSetName) { "A non-null value must be provided for configurationSetName" }
/**
* The time when the ConfigurationSet was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val createdTimestamp: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdTimestamp) { "A non-null value must be provided for createdTimestamp" }
/**
* The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
*/
public val defaultMessageType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.MessageType? = builder.defaultMessageType
/**
* The default sender ID used by the ConfigurationSet.
*/
public val defaultSenderId: kotlin.String? = builder.defaultSenderId
/**
* An array of EventDestination objects that describe any events to log and where to log them.
*/
public val eventDestinations: List = requireNotNull(builder.eventDestinations) { "A non-null value must be provided for eventDestinations" }
/**
* The unique identifier for the protect configuration.
*/
public val protectConfigurationId: kotlin.String? = builder.protectConfigurationId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ConfigurationSetInformation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConfigurationSetInformation(")
append("configurationSetArn=$configurationSetArn,")
append("configurationSetName=$configurationSetName,")
append("createdTimestamp=$createdTimestamp,")
append("defaultMessageType=$defaultMessageType,")
append("defaultSenderId=$defaultSenderId,")
append("eventDestinations=$eventDestinations,")
append("protectConfigurationId=$protectConfigurationId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configurationSetArn.hashCode()
result = 31 * result + (configurationSetName.hashCode())
result = 31 * result + (createdTimestamp.hashCode())
result = 31 * result + (defaultMessageType?.hashCode() ?: 0)
result = 31 * result + (defaultSenderId?.hashCode() ?: 0)
result = 31 * result + (eventDestinations.hashCode())
result = 31 * result + (protectConfigurationId?.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 ConfigurationSetInformation
if (configurationSetArn != other.configurationSetArn) return false
if (configurationSetName != other.configurationSetName) return false
if (createdTimestamp != other.createdTimestamp) return false
if (defaultMessageType != other.defaultMessageType) return false
if (defaultSenderId != other.defaultSenderId) return false
if (eventDestinations != other.eventDestinations) return false
if (protectConfigurationId != other.protectConfigurationId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ConfigurationSetInformation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Resource Name (ARN) of the ConfigurationSet.
*/
public var configurationSetArn: kotlin.String? = null
/**
* The name of the ConfigurationSet.
*/
public var configurationSetName: kotlin.String? = null
/**
* The time when the ConfigurationSet was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
*/
public var defaultMessageType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.MessageType? = null
/**
* The default sender ID used by the ConfigurationSet.
*/
public var defaultSenderId: kotlin.String? = null
/**
* An array of EventDestination objects that describe any events to log and where to log them.
*/
public var eventDestinations: List? = null
/**
* The unique identifier for the protect configuration.
*/
public var protectConfigurationId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ConfigurationSetInformation) : this() {
this.configurationSetArn = x.configurationSetArn
this.configurationSetName = x.configurationSetName
this.createdTimestamp = x.createdTimestamp
this.defaultMessageType = x.defaultMessageType
this.defaultSenderId = x.defaultSenderId
this.eventDestinations = x.eventDestinations
this.protectConfigurationId = x.protectConfigurationId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ConfigurationSetInformation = ConfigurationSetInformation(this)
internal fun correctErrors(): Builder {
if (configurationSetArn == null) configurationSetArn = ""
if (configurationSetName == null) configurationSetName = ""
if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
if (eventDestinations == null) eventDestinations = emptyList()
return this
}
}
}