commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PoolInformation.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
/**
* The information for a pool in an Amazon Web Services account.
*/
public class PoolInformation private constructor(builder: Builder) {
/**
* The time when the pool 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" }
/**
* When set to true the pool can't be deleted.
*/
public val deletionProtectionEnabled: kotlin.Boolean = builder.deletionProtectionEnabled
/**
* 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 messageType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.MessageType = requireNotNull(builder.messageType) { "A non-null value must be provided for messageType" }
/**
* The name of the OptOutList associated with the pool.
*/
public val optOutListName: kotlin.String = requireNotNull(builder.optOutListName) { "A non-null value must be provided for optOutListName" }
/**
* The Amazon Resource Name (ARN) for the pool.
*/
public val poolArn: kotlin.String = requireNotNull(builder.poolArn) { "A non-null value must be provided for poolArn" }
/**
* The unique identifier for the pool.
*/
public val poolId: kotlin.String = requireNotNull(builder.poolId) { "A non-null value must be provided for poolId" }
/**
* When set to false, an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests. For more information see [Self-managed opt-outs](https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out)
*/
public val selfManagedOptOutsEnabled: kotlin.Boolean = builder.selfManagedOptOutsEnabled
/**
* Allows you to enable shared routes on your pool.
*
* By default, this is set to `False`. If you set this value to `True`, your messages are sent using phone numbers or sender IDs (depending on the country) that are shared with other users. In some countries, such as the United States, senders aren't allowed to use shared routes and must use a dedicated phone number or short code.
*/
public val sharedRoutesEnabled: kotlin.Boolean = builder.sharedRoutesEnabled
/**
* The current status of the pool.
*/
public val status: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PoolStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The Amazon Resource Name (ARN) of the two way channel.
*/
public val twoWayChannelArn: kotlin.String? = builder.twoWayChannelArn
/**
* An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
*/
public val twoWayChannelRole: kotlin.String? = builder.twoWayChannelRole
/**
* When set to true you can receive incoming text messages from your end recipients using the TwoWayChannelArn.
*/
public val twoWayEnabled: kotlin.Boolean = builder.twoWayEnabled
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PoolInformation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PoolInformation(")
append("createdTimestamp=$createdTimestamp,")
append("deletionProtectionEnabled=$deletionProtectionEnabled,")
append("messageType=$messageType,")
append("optOutListName=$optOutListName,")
append("poolArn=$poolArn,")
append("poolId=$poolId,")
append("selfManagedOptOutsEnabled=$selfManagedOptOutsEnabled,")
append("sharedRoutesEnabled=$sharedRoutesEnabled,")
append("status=$status,")
append("twoWayChannelArn=$twoWayChannelArn,")
append("twoWayChannelRole=$twoWayChannelRole,")
append("twoWayEnabled=$twoWayEnabled")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createdTimestamp.hashCode()
result = 31 * result + (deletionProtectionEnabled.hashCode())
result = 31 * result + (messageType.hashCode())
result = 31 * result + (optOutListName.hashCode())
result = 31 * result + (poolArn.hashCode())
result = 31 * result + (poolId.hashCode())
result = 31 * result + (selfManagedOptOutsEnabled.hashCode())
result = 31 * result + (sharedRoutesEnabled.hashCode())
result = 31 * result + (status.hashCode())
result = 31 * result + (twoWayChannelArn?.hashCode() ?: 0)
result = 31 * result + (twoWayChannelRole?.hashCode() ?: 0)
result = 31 * result + (twoWayEnabled.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 PoolInformation
if (createdTimestamp != other.createdTimestamp) return false
if (deletionProtectionEnabled != other.deletionProtectionEnabled) return false
if (messageType != other.messageType) return false
if (optOutListName != other.optOutListName) return false
if (poolArn != other.poolArn) return false
if (poolId != other.poolId) return false
if (selfManagedOptOutsEnabled != other.selfManagedOptOutsEnabled) return false
if (sharedRoutesEnabled != other.sharedRoutesEnabled) return false
if (status != other.status) return false
if (twoWayChannelArn != other.twoWayChannelArn) return false
if (twoWayChannelRole != other.twoWayChannelRole) return false
if (twoWayEnabled != other.twoWayEnabled) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PoolInformation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The time when the pool was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* When set to true the pool can't be deleted.
*/
public var deletionProtectionEnabled: kotlin.Boolean = false
/**
* 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 messageType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.MessageType? = null
/**
* The name of the OptOutList associated with the pool.
*/
public var optOutListName: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) for the pool.
*/
public var poolArn: kotlin.String? = null
/**
* The unique identifier for the pool.
*/
public var poolId: kotlin.String? = null
/**
* When set to false, an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests. For more information see [Self-managed opt-outs](https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-managing.html#settings-account-sms-self-managed-opt-out)
*/
public var selfManagedOptOutsEnabled: kotlin.Boolean = false
/**
* Allows you to enable shared routes on your pool.
*
* By default, this is set to `False`. If you set this value to `True`, your messages are sent using phone numbers or sender IDs (depending on the country) that are shared with other users. In some countries, such as the United States, senders aren't allowed to use shared routes and must use a dedicated phone number or short code.
*/
public var sharedRoutesEnabled: kotlin.Boolean = false
/**
* The current status of the pool.
*/
public var status: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PoolStatus? = null
/**
* The Amazon Resource Name (ARN) of the two way channel.
*/
public var twoWayChannelArn: kotlin.String? = null
/**
* An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
*/
public var twoWayChannelRole: kotlin.String? = null
/**
* When set to true you can receive incoming text messages from your end recipients using the TwoWayChannelArn.
*/
public var twoWayEnabled: kotlin.Boolean = false
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PoolInformation) : this() {
this.createdTimestamp = x.createdTimestamp
this.deletionProtectionEnabled = x.deletionProtectionEnabled
this.messageType = x.messageType
this.optOutListName = x.optOutListName
this.poolArn = x.poolArn
this.poolId = x.poolId
this.selfManagedOptOutsEnabled = x.selfManagedOptOutsEnabled
this.sharedRoutesEnabled = x.sharedRoutesEnabled
this.status = x.status
this.twoWayChannelArn = x.twoWayChannelArn
this.twoWayChannelRole = x.twoWayChannelRole
this.twoWayEnabled = x.twoWayEnabled
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PoolInformation = PoolInformation(this)
internal fun correctErrors(): Builder {
if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
if (messageType == null) messageType = MessageType.SdkUnknown("no value provided")
if (optOutListName == null) optOutListName = ""
if (poolArn == null) poolArn = ""
if (poolId == null) poolId = ""
if (status == null) status = PoolStatus.SdkUnknown("no value provided")
return this
}
}
}