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

commonMain.aws.sdk.kotlin.services.wisdom.model.ImportJobSummary.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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Summary information about the import job.
 */
public class ImportJobSummary private constructor(builder: Builder) {
    /**
     * The timestamp when the import job was created.
     */
    public val createdTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdTime) { "A non-null value must be provided for createdTime" }
    /**
     * 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 identifier of the import job.
     */
    public val importJobId: kotlin.String = requireNotNull(builder.importJobId) { "A non-null value must be provided for importJobId" }
    /**
     * The type of import job.
     */
    public val importJobType: aws.sdk.kotlin.services.wisdom.model.ImportJobType = requireNotNull(builder.importJobType) { "A non-null value must be provided for importJobType" }
    /**
     * The Amazon Resource Name (ARN) of the knowledge base.
     */
    public val knowledgeBaseArn: kotlin.String = requireNotNull(builder.knowledgeBaseArn) { "A non-null value must be provided for knowledgeBaseArn" }
    /**
     * 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.
     */
    public val knowledgeBaseId: kotlin.String = requireNotNull(builder.knowledgeBaseId) { "A non-null value must be provided for knowledgeBaseId" }
    /**
     * The timestamp when the import job was last modified.
     */
    public val lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModifiedTime) { "A non-null value must be provided for lastModifiedTime" }
    /**
     * The metadata fields of the imported Wisdom resources.
     */
    public val metadata: Map? = builder.metadata
    /**
     * The status of the import job.
     */
    public val status: aws.sdk.kotlin.services.wisdom.model.ImportJobStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * 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 = requireNotNull(builder.uploadId) { "A non-null value must be provided for uploadId" }

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

    override fun toString(): kotlin.String = buildString {
        append("ImportJobSummary(")
        append("createdTime=$createdTime,")
        append("externalSourceConfiguration=$externalSourceConfiguration,")
        append("importJobId=$importJobId,")
        append("importJobType=$importJobType,")
        append("knowledgeBaseArn=$knowledgeBaseArn,")
        append("knowledgeBaseId=$knowledgeBaseId,")
        append("lastModifiedTime=$lastModifiedTime,")
        append("metadata=$metadata,")
        append("status=$status,")
        append("uploadId=$uploadId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdTime.hashCode()
        result = 31 * result + (externalSourceConfiguration?.hashCode() ?: 0)
        result = 31 * result + (importJobId.hashCode())
        result = 31 * result + (importJobType.hashCode())
        result = 31 * result + (knowledgeBaseArn.hashCode())
        result = 31 * result + (knowledgeBaseId.hashCode())
        result = 31 * result + (lastModifiedTime.hashCode())
        result = 31 * result + (metadata?.hashCode() ?: 0)
        result = 31 * result + (status.hashCode())
        result = 31 * result + (uploadId.hashCode())
        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 ImportJobSummary

        if (createdTime != other.createdTime) return false
        if (externalSourceConfiguration != other.externalSourceConfiguration) return false
        if (importJobId != other.importJobId) return false
        if (importJobType != other.importJobType) return false
        if (knowledgeBaseArn != other.knowledgeBaseArn) return false
        if (knowledgeBaseId != other.knowledgeBaseId) return false
        if (lastModifiedTime != other.lastModifiedTime) return false
        if (metadata != other.metadata) return false
        if (status != other.status) return false
        if (uploadId != other.uploadId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The timestamp when the import job was created.
         */
        public var createdTime: aws.smithy.kotlin.runtime.time.Instant? = 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 identifier of the import job.
         */
        public var importJobId: kotlin.String? = null
        /**
         * The type of import job.
         */
        public var importJobType: aws.sdk.kotlin.services.wisdom.model.ImportJobType? = null
        /**
         * The Amazon Resource Name (ARN) of the knowledge base.
         */
        public var knowledgeBaseArn: kotlin.String? = 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.
         */
        public var knowledgeBaseId: kotlin.String? = null
        /**
         * The timestamp when the import job was last modified.
         */
        public var lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The metadata fields of the imported Wisdom resources.
         */
        public var metadata: Map? = null
        /**
         * The status of the import job.
         */
        public var status: aws.sdk.kotlin.services.wisdom.model.ImportJobStatus? = 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.ImportJobSummary) : this() {
            this.createdTime = x.createdTime
            this.externalSourceConfiguration = x.externalSourceConfiguration
            this.importJobId = x.importJobId
            this.importJobType = x.importJobType
            this.knowledgeBaseArn = x.knowledgeBaseArn
            this.knowledgeBaseId = x.knowledgeBaseId
            this.lastModifiedTime = x.lastModifiedTime
            this.metadata = x.metadata
            this.status = x.status
            this.uploadId = x.uploadId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.wisdom.model.ImportJobSummary = ImportJobSummary(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 {
            if (createdTime == null) createdTime = Instant.fromEpochSeconds(0)
            if (importJobId == null) importJobId = ""
            if (importJobType == null) importJobType = ImportJobType.SdkUnknown("no value provided")
            if (knowledgeBaseArn == null) knowledgeBaseArn = ""
            if (knowledgeBaseId == null) knowledgeBaseId = ""
            if (lastModifiedTime == null) lastModifiedTime = Instant.fromEpochSeconds(0)
            if (status == null) status = ImportJobStatus.SdkUnknown("no value provided")
            if (uploadId == null) uploadId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy