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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.pinpointsmsvoice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An object that contains a voice message and information about the recipient that you want to send it to.
 */
public class VoiceMessageContent private constructor(builder: Builder) {
    /**
     * An object that defines a message that contains text formatted using Amazon Pinpoint Voice Instructions markup.
     */
    public val callInstructionsMessage: aws.sdk.kotlin.services.pinpointsmsvoice.model.CallInstructionsMessageType? = builder.callInstructionsMessage
    /**
     * An object that defines a message that contains unformatted text.
     */
    public val plainTextMessage: aws.sdk.kotlin.services.pinpointsmsvoice.model.PlainTextMessageType? = builder.plainTextMessage
    /**
     * An object that defines a message that contains SSML-formatted text.
     */
    public val ssmlMessage: aws.sdk.kotlin.services.pinpointsmsvoice.model.SsmlMessageType? = builder.ssmlMessage

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

    override fun toString(): kotlin.String = buildString {
        append("VoiceMessageContent(")
        append("callInstructionsMessage=$callInstructionsMessage,")
        append("plainTextMessage=$plainTextMessage,")
        append("ssmlMessage=$ssmlMessage")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = callInstructionsMessage?.hashCode() ?: 0
        result = 31 * result + (plainTextMessage?.hashCode() ?: 0)
        result = 31 * result + (ssmlMessage?.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 VoiceMessageContent

        if (callInstructionsMessage != other.callInstructionsMessage) return false
        if (plainTextMessage != other.plainTextMessage) return false
        if (ssmlMessage != other.ssmlMessage) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An object that defines a message that contains text formatted using Amazon Pinpoint Voice Instructions markup.
         */
        public var callInstructionsMessage: aws.sdk.kotlin.services.pinpointsmsvoice.model.CallInstructionsMessageType? = null
        /**
         * An object that defines a message that contains unformatted text.
         */
        public var plainTextMessage: aws.sdk.kotlin.services.pinpointsmsvoice.model.PlainTextMessageType? = null
        /**
         * An object that defines a message that contains SSML-formatted text.
         */
        public var ssmlMessage: aws.sdk.kotlin.services.pinpointsmsvoice.model.SsmlMessageType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoice.model.VoiceMessageContent) : this() {
            this.callInstructionsMessage = x.callInstructionsMessage
            this.plainTextMessage = x.plainTextMessage
            this.ssmlMessage = x.ssmlMessage
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.pinpointsmsvoice.model.CallInstructionsMessageType] inside the given [block]
         */
        public fun callInstructionsMessage(block: aws.sdk.kotlin.services.pinpointsmsvoice.model.CallInstructionsMessageType.Builder.() -> kotlin.Unit) {
            this.callInstructionsMessage = aws.sdk.kotlin.services.pinpointsmsvoice.model.CallInstructionsMessageType.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.pinpointsmsvoice.model.PlainTextMessageType] inside the given [block]
         */
        public fun plainTextMessage(block: aws.sdk.kotlin.services.pinpointsmsvoice.model.PlainTextMessageType.Builder.() -> kotlin.Unit) {
            this.plainTextMessage = aws.sdk.kotlin.services.pinpointsmsvoice.model.PlainTextMessageType.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.pinpointsmsvoice.model.SsmlMessageType] inside the given [block]
         */
        public fun ssmlMessage(block: aws.sdk.kotlin.services.pinpointsmsvoice.model.SsmlMessageType.Builder.() -> kotlin.Unit) {
            this.ssmlMessage = aws.sdk.kotlin.services.pinpointsmsvoice.model.SsmlMessageType.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy