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

commonMain.aws.sdk.kotlin.services.wisdom.model.StartImportJobRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.wisdom.model

import aws.smithy.kotlin.runtime.SdkDsl

public class StartImportJobRequest private constructor(builder: Builder) {
    /**
     * The tags used to organize, track, or control access for this resource.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The configuration information of the external source that the resource data are imported from.
     */
    public val externalSourceConfiguration: aws.sdk.kotlin.services.wisdom.model.ExternalSourceConfiguration? = builder.externalSourceConfiguration
    /**
     * The type of the import job.
     * + For importing quick response resource, set the value to `QUICK_RESPONSES`.
     */
    public val importJobType: aws.sdk.kotlin.services.wisdom.model.ImportJobType? = builder.importJobType
    /**
     * The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.
     * + For importing Wisdom quick responses, this should be a `QUICK_RESPONSES` type knowledge base.
     */
    public val knowledgeBaseId: kotlin.String? = builder.knowledgeBaseId
    /**
     * The metadata fields of the imported Wisdom resources.
     */
    public val metadata: Map? = builder.metadata
    /**
     * A pointer to the uploaded asset. This value is returned by [StartContentUpload](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html).
     */
    public val uploadId: kotlin.String? = builder.uploadId

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

    override fun toString(): kotlin.String = buildString {
        append("StartImportJobRequest(")
        append("clientToken=$clientToken,")
        append("externalSourceConfiguration=$externalSourceConfiguration,")
        append("importJobType=$importJobType,")
        append("knowledgeBaseId=$knowledgeBaseId,")
        append("metadata=$metadata,")
        append("uploadId=$uploadId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (externalSourceConfiguration?.hashCode() ?: 0)
        result = 31 * result + (importJobType?.hashCode() ?: 0)
        result = 31 * result + (knowledgeBaseId?.hashCode() ?: 0)
        result = 31 * result + (metadata?.hashCode() ?: 0)
        result = 31 * result + (uploadId?.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 StartImportJobRequest

        if (clientToken != other.clientToken) return false
        if (externalSourceConfiguration != other.externalSourceConfiguration) return false
        if (importJobType != other.importJobType) return false
        if (knowledgeBaseId != other.knowledgeBaseId) return false
        if (metadata != other.metadata) return false
        if (uploadId != other.uploadId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The tags used to organize, track, or control access for this resource.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The configuration information of the external source that the resource data are imported from.
         */
        public var externalSourceConfiguration: aws.sdk.kotlin.services.wisdom.model.ExternalSourceConfiguration? = null
        /**
         * The type of the import job.
         * + For importing quick response resource, set the value to `QUICK_RESPONSES`.
         */
        public var importJobType: aws.sdk.kotlin.services.wisdom.model.ImportJobType? = null
        /**
         * The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.
         * + For importing Wisdom quick responses, this should be a `QUICK_RESPONSES` type knowledge base.
         */
        public var knowledgeBaseId: kotlin.String? = null
        /**
         * The metadata fields of the imported Wisdom resources.
         */
        public var metadata: Map? = null
        /**
         * A pointer to the uploaded asset. This value is returned by [StartContentUpload](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html).
         */
        public var uploadId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wisdom.model.StartImportJobRequest) : this() {
            this.clientToken = x.clientToken
            this.externalSourceConfiguration = x.externalSourceConfiguration
            this.importJobType = x.importJobType
            this.knowledgeBaseId = x.knowledgeBaseId
            this.metadata = x.metadata
            this.uploadId = x.uploadId
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy