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

commonMain.aws.sdk.kotlin.services.qapps.model.ImportDocumentRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.qapps.model

import aws.smithy.kotlin.runtime.SdkDsl

public class ImportDocumentRequest private constructor(builder: Builder) {
    /**
     * The unique identifier of the Q App the file is associated with.
     */
    public val appId: kotlin.String? = builder.appId
    /**
     * The unique identifier of the card the file is associated with.
     */
    public val cardId: kotlin.String? = builder.cardId
    /**
     * The base64-encoded contents of the file to upload.
     */
    public val fileContentsBase64: kotlin.String? = builder.fileContentsBase64
    /**
     * The name of the file being uploaded.
     */
    public val fileName: kotlin.String? = builder.fileName
    /**
     * The unique identifier of the Amazon Q Business application environment instance.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * Whether the file is associated with a Q App definition or a specific Q App session.
     */
    public val scope: aws.sdk.kotlin.services.qapps.model.DocumentScope? = builder.scope
    /**
     * The unique identifier of the Q App session the file is associated with, if applicable.
     */
    public val sessionId: kotlin.String? = builder.sessionId

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

    override fun toString(): kotlin.String = buildString {
        append("ImportDocumentRequest(")
        append("appId=$appId,")
        append("cardId=$cardId,")
        append("fileContentsBase64=$fileContentsBase64,")
        append("fileName=$fileName,")
        append("instanceId=$instanceId,")
        append("scope=$scope,")
        append("sessionId=$sessionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appId?.hashCode() ?: 0
        result = 31 * result + (cardId?.hashCode() ?: 0)
        result = 31 * result + (fileContentsBase64?.hashCode() ?: 0)
        result = 31 * result + (fileName?.hashCode() ?: 0)
        result = 31 * result + (instanceId?.hashCode() ?: 0)
        result = 31 * result + (scope?.hashCode() ?: 0)
        result = 31 * result + (sessionId?.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 ImportDocumentRequest

        if (appId != other.appId) return false
        if (cardId != other.cardId) return false
        if (fileContentsBase64 != other.fileContentsBase64) return false
        if (fileName != other.fileName) return false
        if (instanceId != other.instanceId) return false
        if (scope != other.scope) return false
        if (sessionId != other.sessionId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique identifier of the Q App the file is associated with.
         */
        public var appId: kotlin.String? = null
        /**
         * The unique identifier of the card the file is associated with.
         */
        public var cardId: kotlin.String? = null
        /**
         * The base64-encoded contents of the file to upload.
         */
        public var fileContentsBase64: kotlin.String? = null
        /**
         * The name of the file being uploaded.
         */
        public var fileName: kotlin.String? = null
        /**
         * The unique identifier of the Amazon Q Business application environment instance.
         */
        public var instanceId: kotlin.String? = null
        /**
         * Whether the file is associated with a Q App definition or a specific Q App session.
         */
        public var scope: aws.sdk.kotlin.services.qapps.model.DocumentScope? = null
        /**
         * The unique identifier of the Q App session the file is associated with, if applicable.
         */
        public var sessionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qapps.model.ImportDocumentRequest) : this() {
            this.appId = x.appId
            this.cardId = x.cardId
            this.fileContentsBase64 = x.fileContentsBase64
            this.fileName = x.fileName
            this.instanceId = x.instanceId
            this.scope = x.scope
            this.sessionId = x.sessionId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy