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

commonMain.aws.sdk.kotlin.services.honeycode.model.DescribeTableDataImportJobResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.honeycode.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DescribeTableDataImportJobResponse private constructor(builder: Builder) {
    /**
     * If job status is failed, error code to understand reason for the failure.
     */
    public val errorCode: aws.sdk.kotlin.services.honeycode.model.ErrorCode? = builder.errorCode
    /**
     * The metadata about the job that was submitted for import.
     */
    public val jobMetadata: aws.sdk.kotlin.services.honeycode.model.TableDataImportJobMetadata? = builder.jobMetadata
    /**
     * The current status of the import job.
     */
    public val jobStatus: aws.sdk.kotlin.services.honeycode.model.TableDataImportJobStatus = requireNotNull(builder.jobStatus) { "A non-null value must be provided for jobStatus" }
    /**
     * A message providing more details about the current status of the import job.
     */
    public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeTableDataImportJobResponse(")
        append("errorCode=$errorCode,")
        append("jobMetadata=$jobMetadata,")
        append("jobStatus=$jobStatus,")
        append("message=$message")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errorCode?.hashCode() ?: 0
        result = 31 * result + (jobMetadata?.hashCode() ?: 0)
        result = 31 * result + (jobStatus.hashCode())
        result = 31 * result + (message.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 DescribeTableDataImportJobResponse

        if (errorCode != other.errorCode) return false
        if (jobMetadata != other.jobMetadata) return false
        if (jobStatus != other.jobStatus) return false
        if (message != other.message) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * If job status is failed, error code to understand reason for the failure.
         */
        public var errorCode: aws.sdk.kotlin.services.honeycode.model.ErrorCode? = null
        /**
         * The metadata about the job that was submitted for import.
         */
        public var jobMetadata: aws.sdk.kotlin.services.honeycode.model.TableDataImportJobMetadata? = null
        /**
         * The current status of the import job.
         */
        public var jobStatus: aws.sdk.kotlin.services.honeycode.model.TableDataImportJobStatus? = null
        /**
         * A message providing more details about the current status of the import job.
         */
        public var message: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.honeycode.model.DescribeTableDataImportJobResponse) : this() {
            this.errorCode = x.errorCode
            this.jobMetadata = x.jobMetadata
            this.jobStatus = x.jobStatus
            this.message = x.message
        }

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

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

        internal fun correctErrors(): Builder {
            if (jobStatus == null) jobStatus = TableDataImportJobStatus.SdkUnknown("no value provided")
            if (message == null) message = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy