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

commonMain.aws.sdk.kotlin.services.qbusiness.model.ChatSyncResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.qbusiness.model



public class ChatSyncResponse private constructor(builder: Builder) {
    /**
     * A request from Amazon Q Business to the end user for information Amazon Q Business needs to successfully complete a requested plugin action.
     */
    public val actionReview: aws.sdk.kotlin.services.qbusiness.model.ActionReview? = builder.actionReview
    /**
     * The identifier of the Amazon Q Business conversation.
     */
    public val conversationId: kotlin.String? = builder.conversationId
    /**
     * A list of files which failed to upload during chat.
     */
    public val failedAttachments: List? = builder.failedAttachments
    /**
     * The source documents used to generate the conversation response.
     */
    public val sourceAttributions: List? = builder.sourceAttributions
    /**
     * An AI-generated message in a conversation.
     */
    public val systemMessage: kotlin.String? = builder.systemMessage
    /**
     * The identifier of an Amazon Q Business AI generated message within the conversation.
     */
    public val systemMessageId: kotlin.String? = builder.systemMessageId
    /**
     * The identifier of an Amazon Q Business end user text input message within the conversation.
     */
    public val userMessageId: kotlin.String? = builder.userMessageId

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

    override fun toString(): kotlin.String = buildString {
        append("ChatSyncResponse(")
        append("actionReview=$actionReview,")
        append("conversationId=$conversationId,")
        append("failedAttachments=$failedAttachments,")
        append("sourceAttributions=$sourceAttributions,")
        append("systemMessage=$systemMessage,")
        append("systemMessageId=$systemMessageId,")
        append("userMessageId=$userMessageId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionReview?.hashCode() ?: 0
        result = 31 * result + (conversationId?.hashCode() ?: 0)
        result = 31 * result + (failedAttachments?.hashCode() ?: 0)
        result = 31 * result + (sourceAttributions?.hashCode() ?: 0)
        result = 31 * result + (systemMessage?.hashCode() ?: 0)
        result = 31 * result + (systemMessageId?.hashCode() ?: 0)
        result = 31 * result + (userMessageId?.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 ChatSyncResponse

        if (actionReview != other.actionReview) return false
        if (conversationId != other.conversationId) return false
        if (failedAttachments != other.failedAttachments) return false
        if (sourceAttributions != other.sourceAttributions) return false
        if (systemMessage != other.systemMessage) return false
        if (systemMessageId != other.systemMessageId) return false
        if (userMessageId != other.userMessageId) return false

        return true
    }

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

    public class Builder {
        /**
         * A request from Amazon Q Business to the end user for information Amazon Q Business needs to successfully complete a requested plugin action.
         */
        public var actionReview: aws.sdk.kotlin.services.qbusiness.model.ActionReview? = null
        /**
         * The identifier of the Amazon Q Business conversation.
         */
        public var conversationId: kotlin.String? = null
        /**
         * A list of files which failed to upload during chat.
         */
        public var failedAttachments: List? = null
        /**
         * The source documents used to generate the conversation response.
         */
        public var sourceAttributions: List? = null
        /**
         * An AI-generated message in a conversation.
         */
        public var systemMessage: kotlin.String? = null
        /**
         * The identifier of an Amazon Q Business AI generated message within the conversation.
         */
        public var systemMessageId: kotlin.String? = null
        /**
         * The identifier of an Amazon Q Business end user text input message within the conversation.
         */
        public var userMessageId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.ChatSyncResponse) : this() {
            this.actionReview = x.actionReview
            this.conversationId = x.conversationId
            this.failedAttachments = x.failedAttachments
            this.sourceAttributions = x.sourceAttributions
            this.systemMessage = x.systemMessage
            this.systemMessageId = x.systemMessageId
            this.userMessageId = x.userMessageId
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy