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

commonMain.aws.sdk.kotlin.services.connect.model.ChatMessage.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.connect.model



/**
 * A chat message.
 */
public class ChatMessage private constructor(builder: Builder) {
    /**
     * The content of the chat message.
     * + For `text/plain` and `text/markdown`, the Length Constraints are Minimum of 1, Maximum of 1024.
     * + For `application/json`, the Length Constraints are Minimum of 1, Maximum of 12000.
     * + For `application/vnd.amazonaws.connect.message.interactive.response`, the Length Constraints are Minimum of 1, Maximum of 12288.
     */
    public val content: kotlin.String? = builder.content
    /**
     * The type of the content. Supported types are `text/plain`, `text/markdown`, `application/json`, and `application/vnd.amazonaws.connect.message.interactive.response`.
     */
    public val contentType: kotlin.String? = builder.contentType

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

    override fun toString(): kotlin.String = buildString {
        append("ChatMessage(")
        append("content=$content,")
        append("contentType=$contentType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = content?.hashCode() ?: 0
        result = 31 * result + (contentType?.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 ChatMessage

        if (content != other.content) return false
        if (contentType != other.contentType) return false

        return true
    }

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

    public class Builder {
        /**
         * The content of the chat message.
         * + For `text/plain` and `text/markdown`, the Length Constraints are Minimum of 1, Maximum of 1024.
         * + For `application/json`, the Length Constraints are Minimum of 1, Maximum of 12000.
         * + For `application/vnd.amazonaws.connect.message.interactive.response`, the Length Constraints are Minimum of 1, Maximum of 12288.
         */
        public var content: kotlin.String? = null
        /**
         * The type of the content. Supported types are `text/plain`, `text/markdown`, `application/json`, and `application/vnd.amazonaws.connect.message.interactive.response`.
         */
        public var contentType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connect.model.ChatMessage) : this() {
            this.content = x.content
            this.contentType = x.contentType
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.connect.model.ChatMessage = ChatMessage(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy