commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendMediaMessageRequest.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 SendMediaMessageRequest 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
/**
* 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
/**
* The maximum amount that you want to spend, in US dollars, per each MMS message.
*/
public val maxPrice: kotlin.String? = builder.maxPrice
/**
* An array of URLs to each media file to send.
*
* The media files have to be stored in a publicly available S3 bucket. Supported media file formats are listed in [MMS file types, size and character limits](https://docs.aws.amazon.com/sms-voice/latest/userguide/mms-limitations-character.html). For more information on creating an S3 bucket and managing objects, see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) and [Uploading objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html) in the S3 user guide.
*/
public val mediaUrls: List? = builder.mediaUrls
/**
* The text body of the message.
*/
public val messageBody: kotlin.String? = builder.messageBody
/**
* 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
/**
* The unique identifier of the protect configuration to use.
*/
public val protectConfigurationId: kotlin.String? = builder.protectConfigurationId
/**
* 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.SendMediaMessageRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SendMediaMessageRequest(")
append("configurationSetName=$configurationSetName,")
append("context=$context,")
append("destinationPhoneNumber=$destinationPhoneNumber,")
append("dryRun=$dryRun,")
append("maxPrice=$maxPrice,")
append("mediaUrls=$mediaUrls,")
append("messageBody=$messageBody,")
append("originationIdentity=$originationIdentity,")
append("protectConfigurationId=$protectConfigurationId,")
append("timeToLive=$timeToLive")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configurationSetName?.hashCode() ?: 0
result = 31 * result + (context?.hashCode() ?: 0)
result = 31 * result + (destinationPhoneNumber?.hashCode() ?: 0)
result = 31 * result + (dryRun?.hashCode() ?: 0)
result = 31 * result + (maxPrice?.hashCode() ?: 0)
result = 31 * result + (mediaUrls?.hashCode() ?: 0)
result = 31 * result + (messageBody?.hashCode() ?: 0)
result = 31 * result + (originationIdentity?.hashCode() ?: 0)
result = 31 * result + (protectConfigurationId?.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 SendMediaMessageRequest
if (configurationSetName != other.configurationSetName) return false
if (context != other.context) return false
if (destinationPhoneNumber != other.destinationPhoneNumber) return false
if (dryRun != other.dryRun) return false
if (maxPrice != other.maxPrice) return false
if (mediaUrls != other.mediaUrls) return false
if (messageBody != other.messageBody) return false
if (originationIdentity != other.originationIdentity) return false
if (protectConfigurationId != other.protectConfigurationId) return false
if (timeToLive != other.timeToLive) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendMediaMessageRequest = Builder(this).apply(block).build()
@SdkDsl
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
/**
* 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? = null
/**
* The maximum amount that you want to spend, in US dollars, per each MMS message.
*/
public var maxPrice: kotlin.String? = null
/**
* An array of URLs to each media file to send.
*
* The media files have to be stored in a publicly available S3 bucket. Supported media file formats are listed in [MMS file types, size and character limits](https://docs.aws.amazon.com/sms-voice/latest/userguide/mms-limitations-character.html). For more information on creating an S3 bucket and managing objects, see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) and [Uploading objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html) in the S3 user guide.
*/
public var mediaUrls: List? = null
/**
* The text body of the message.
*/
public var messageBody: kotlin.String? = 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
/**
* The unique identifier of the protect configuration to use.
*/
public var protectConfigurationId: 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.SendMediaMessageRequest) : this() {
this.configurationSetName = x.configurationSetName
this.context = x.context
this.destinationPhoneNumber = x.destinationPhoneNumber
this.dryRun = x.dryRun
this.maxPrice = x.maxPrice
this.mediaUrls = x.mediaUrls
this.messageBody = x.messageBody
this.originationIdentity = x.originationIdentity
this.protectConfigurationId = x.protectConfigurationId
this.timeToLive = x.timeToLive
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendMediaMessageRequest = SendMediaMessageRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}