commonMain.aws.sdk.kotlin.services.pinpointsmsvoice.model.SendVoiceMessageRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoice-jvm Show documentation
Show all versions of pinpointsmsvoice-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointsmsvoice.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* SendVoiceMessageRequest
*/
public class SendVoiceMessageRequest private constructor(builder: Builder) {
/**
* The phone number that appears on recipients' devices when they receive the message.
*/
public val callerId: kotlin.String? = builder.callerId
/**
* The name of the configuration set that you want to use to send the message.
*/
public val configurationSetName: kotlin.String? = builder.configurationSetName
/**
* An object that contains a voice message and information about the recipient that you want to send it to.
*/
public val content: aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent? = builder.content
/**
* The phone number that you want to send the voice message to.
*/
public val destinationPhoneNumber: kotlin.String? = builder.destinationPhoneNumber
/**
* The phone number that Amazon Pinpoint should use to send the voice message. This isn't necessarily the phone number that appears on recipients' devices when they receive the message, because you can specify a CallerId parameter in the request.
*/
public val originationPhoneNumber: kotlin.String? = builder.originationPhoneNumber
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoice.model.SendVoiceMessageRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SendVoiceMessageRequest(")
append("callerId=$callerId,")
append("configurationSetName=$configurationSetName,")
append("content=$content,")
append("destinationPhoneNumber=$destinationPhoneNumber,")
append("originationPhoneNumber=$originationPhoneNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = callerId?.hashCode() ?: 0
result = 31 * result + (configurationSetName?.hashCode() ?: 0)
result = 31 * result + (content?.hashCode() ?: 0)
result = 31 * result + (destinationPhoneNumber?.hashCode() ?: 0)
result = 31 * result + (originationPhoneNumber?.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 SendVoiceMessageRequest
if (callerId != other.callerId) return false
if (configurationSetName != other.configurationSetName) return false
if (content != other.content) return false
if (destinationPhoneNumber != other.destinationPhoneNumber) return false
if (originationPhoneNumber != other.originationPhoneNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoice.model.SendVoiceMessageRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The phone number that appears on recipients' devices when they receive the message.
*/
public var callerId: kotlin.String? = null
/**
* The name of the configuration set that you want to use to send the message.
*/
public var configurationSetName: kotlin.String? = null
/**
* An object that contains a voice message and information about the recipient that you want to send it to.
*/
public var content: aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent? = null
/**
* The phone number that you want to send the voice message to.
*/
public var destinationPhoneNumber: kotlin.String? = null
/**
* The phone number that Amazon Pinpoint should use to send the voice message. This isn't necessarily the phone number that appears on recipients' devices when they receive the message, because you can specify a CallerId parameter in the request.
*/
public var originationPhoneNumber: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoice.model.SendVoiceMessageRequest) : this() {
this.callerId = x.callerId
this.configurationSetName = x.configurationSetName
this.content = x.content
this.destinationPhoneNumber = x.destinationPhoneNumber
this.originationPhoneNumber = x.originationPhoneNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoice.model.SendVoiceMessageRequest = SendVoiceMessageRequest(this)
/**
* construct an [aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent] inside the given [block]
*/
public fun content(block: aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent.Builder.() -> kotlin.Unit) {
this.content = aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}