commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendTextMessageRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointsmsvoicev2.model
public class SendTextMessageRequest private constructor(builder: Builder) {
/**
* The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
*/
public val configurationSetName: kotlin.String? = builder.configurationSetName
/**
* You can specify custom data in this field. If you do, that data is logged to the event destination.
*/
public val context: Map? = builder.context
/**
* This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see [Special requirements for sending SMS messages to recipients in India](https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html).
*/
public val destinationCountryParameters: Map? = builder.destinationCountryParameters
/**
* The destination phone number in E.164 format.
*/
public val destinationPhoneNumber: kotlin.String? = builder.destinationPhoneNumber
/**
* When set to true, the message is checked and validated, but isn't sent to the end recipient.
*/
public val dryRun: kotlin.Boolean = builder.dryRun
/**
* When you register a short code in the US, you must specify a program name. If you don’t have a US short code, omit this attribute.
*/
public val keyword: kotlin.String? = builder.keyword
/**
* The maximum amount that you want to spend, in US dollars, per each text message part. A text message can contain multiple parts.
*/
public val maxPrice: kotlin.String? = builder.maxPrice
/**
* The body of the text message.
*/
public val messageBody: kotlin.String? = builder.messageBody
/**
* 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? = builder.messageType
/**
* The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.
*/
public val originationIdentity: kotlin.String? = builder.originationIdentity
/**
* How long the text message is valid for. By default this is 72 hours.
*/
public val timeToLive: kotlin.Int? = builder.timeToLive
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendTextMessageRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SendTextMessageRequest(")
append("configurationSetName=$configurationSetName,")
append("context=$context,")
append("destinationCountryParameters=$destinationCountryParameters,")
append("destinationPhoneNumber=$destinationPhoneNumber,")
append("dryRun=$dryRun,")
append("keyword=$keyword,")
append("maxPrice=$maxPrice,")
append("messageBody=$messageBody,")
append("messageType=$messageType,")
append("originationIdentity=$originationIdentity,")
append("timeToLive=$timeToLive)")
}
override fun hashCode(): kotlin.Int {
var result = configurationSetName?.hashCode() ?: 0
result = 31 * result + (context?.hashCode() ?: 0)
result = 31 * result + (destinationCountryParameters?.hashCode() ?: 0)
result = 31 * result + (destinationPhoneNumber?.hashCode() ?: 0)
result = 31 * result + (dryRun.hashCode())
result = 31 * result + (keyword?.hashCode() ?: 0)
result = 31 * result + (maxPrice?.hashCode() ?: 0)
result = 31 * result + (messageBody?.hashCode() ?: 0)
result = 31 * result + (messageType?.hashCode() ?: 0)
result = 31 * result + (originationIdentity?.hashCode() ?: 0)
result = 31 * result + (timeToLive ?: 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 SendTextMessageRequest
if (configurationSetName != other.configurationSetName) return false
if (context != other.context) return false
if (destinationCountryParameters != other.destinationCountryParameters) return false
if (destinationPhoneNumber != other.destinationPhoneNumber) return false
if (dryRun != other.dryRun) return false
if (keyword != other.keyword) return false
if (maxPrice != other.maxPrice) return false
if (messageBody != other.messageBody) return false
if (messageType != other.messageType) return false
if (originationIdentity != other.originationIdentity) return false
if (timeToLive != other.timeToLive) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendTextMessageRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
*/
public var configurationSetName: kotlin.String? = null
/**
* You can specify custom data in this field. If you do, that data is logged to the event destination.
*/
public var context: Map? = null
/**
* This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see [Special requirements for sending SMS messages to recipients in India](https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html).
*/
public var destinationCountryParameters: Map? = null
/**
* The destination phone number in E.164 format.
*/
public var destinationPhoneNumber: kotlin.String? = null
/**
* When set to true, the message is checked and validated, but isn't sent to the end recipient.
*/
public var dryRun: kotlin.Boolean = false
/**
* When you register a short code in the US, you must specify a program name. If you don’t have a US short code, omit this attribute.
*/
public var keyword: kotlin.String? = null
/**
* The maximum amount that you want to spend, in US dollars, per each text message part. A text message can contain multiple parts.
*/
public var maxPrice: kotlin.String? = null
/**
* The body of the text message.
*/
public var messageBody: kotlin.String? = 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 messageType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.MessageType? = null
/**
* The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.
*/
public var originationIdentity: kotlin.String? = null
/**
* How long the text message is valid for. By default this is 72 hours.
*/
public var timeToLive: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendTextMessageRequest) : this() {
this.configurationSetName = x.configurationSetName
this.context = x.context
this.destinationCountryParameters = x.destinationCountryParameters
this.destinationPhoneNumber = x.destinationPhoneNumber
this.dryRun = x.dryRun
this.keyword = x.keyword
this.maxPrice = x.maxPrice
this.messageBody = x.messageBody
this.messageType = x.messageType
this.originationIdentity = x.originationIdentity
this.timeToLive = x.timeToLive
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendTextMessageRequest = SendTextMessageRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy