All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendVoiceMessageRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.pinpointsmsvoicev2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class SendVoiceMessageRequest 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 to spend per voice message, in US dollars.
     */
    public val maxPricePerMinute: kotlin.String? = builder.maxPricePerMinute
    /**
     * The text to convert to a voice message.
     */
    public val messageBody: kotlin.String? = builder.messageBody
    /**
     * Specifies if the MessageBody field contains text or [speech synthesis markup language (SSML)](https://docs.aws.amazon.com/polly/latest/dg/what-is.html).
     * + TEXT: This is the default value. When used the maximum character limit is 3000.
     * + SSML: When used the maximum character limit is 6000 including SSML tagging.
     */
    public val messageBodyTextType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.VoiceMessageBodyTextType? = builder.messageBodyTextType
    /**
     * The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.
     *
     * If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
     */
    public val originationIdentity: kotlin.String? = builder.originationIdentity
    /**
     * The unique identifier for the protect configuration.
     */
    public val protectConfigurationId: kotlin.String? = builder.protectConfigurationId
    /**
     * How long the voice message is valid for. By default this is 72 hours.
     */
    public val timeToLive: kotlin.Int? = builder.timeToLive
    /**
     * The voice for the [Amazon Polly](https://docs.aws.amazon.com/polly/latest/dg/what-is.html) service to use. By default this is set to "MATTHEW".
     */
    public val voiceId: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.VoiceId? = builder.voiceId

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendVoiceMessageRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("SendVoiceMessageRequest(")
        append("configurationSetName=$configurationSetName,")
        append("context=$context,")
        append("destinationPhoneNumber=$destinationPhoneNumber,")
        append("dryRun=$dryRun,")
        append("maxPricePerMinute=$maxPricePerMinute,")
        append("messageBody=$messageBody,")
        append("messageBodyTextType=$messageBodyTextType,")
        append("originationIdentity=$originationIdentity,")
        append("protectConfigurationId=$protectConfigurationId,")
        append("timeToLive=$timeToLive,")
        append("voiceId=$voiceId")
        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 + (maxPricePerMinute?.hashCode() ?: 0)
        result = 31 * result + (messageBody?.hashCode() ?: 0)
        result = 31 * result + (messageBodyTextType?.hashCode() ?: 0)
        result = 31 * result + (originationIdentity?.hashCode() ?: 0)
        result = 31 * result + (protectConfigurationId?.hashCode() ?: 0)
        result = 31 * result + (timeToLive ?: 0)
        result = 31 * result + (voiceId?.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 (configurationSetName != other.configurationSetName) return false
        if (context != other.context) return false
        if (destinationPhoneNumber != other.destinationPhoneNumber) return false
        if (dryRun != other.dryRun) return false
        if (maxPricePerMinute != other.maxPricePerMinute) return false
        if (messageBody != other.messageBody) return false
        if (messageBodyTextType != other.messageBodyTextType) return false
        if (originationIdentity != other.originationIdentity) return false
        if (protectConfigurationId != other.protectConfigurationId) return false
        if (timeToLive != other.timeToLive) return false
        if (voiceId != other.voiceId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendVoiceMessageRequest = 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 to spend per voice message, in US dollars.
         */
        public var maxPricePerMinute: kotlin.String? = null
        /**
         * The text to convert to a voice message.
         */
        public var messageBody: kotlin.String? = null
        /**
         * Specifies if the MessageBody field contains text or [speech synthesis markup language (SSML)](https://docs.aws.amazon.com/polly/latest/dg/what-is.html).
         * + TEXT: This is the default value. When used the maximum character limit is 3000.
         * + SSML: When used the maximum character limit is 6000 including SSML tagging.
         */
        public var messageBodyTextType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.VoiceMessageBodyTextType? = null
        /**
         * The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.
         *
         * If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
         */
        public var originationIdentity: kotlin.String? = null
        /**
         * The unique identifier for the protect configuration.
         */
        public var protectConfigurationId: kotlin.String? = null
        /**
         * How long the voice message is valid for. By default this is 72 hours.
         */
        public var timeToLive: kotlin.Int? = null
        /**
         * The voice for the [Amazon Polly](https://docs.aws.amazon.com/polly/latest/dg/what-is.html) service to use. By default this is set to "MATTHEW".
         */
        public var voiceId: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.VoiceId? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendVoiceMessageRequest) : this() {
            this.configurationSetName = x.configurationSetName
            this.context = x.context
            this.destinationPhoneNumber = x.destinationPhoneNumber
            this.dryRun = x.dryRun
            this.maxPricePerMinute = x.maxPricePerMinute
            this.messageBody = x.messageBody
            this.messageBodyTextType = x.messageBodyTextType
            this.originationIdentity = x.originationIdentity
            this.protectConfigurationId = x.protectConfigurationId
            this.timeToLive = x.timeToLive
            this.voiceId = x.voiceId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SendVoiceMessageRequest = SendVoiceMessageRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy