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

commonMain.aws.sdk.kotlin.services.iottwinmaker.model.CancelMetadataTransferJobResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iottwinmaker.model

import aws.smithy.kotlin.runtime.time.Instant

public class CancelMetadataTransferJobResponse private constructor(builder: Builder) {
    /**
     * The metadata transfer job ARN.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The metadata transfer job Id.
     */
    public val metadataTransferJobId: kotlin.String = requireNotNull(builder.metadataTransferJobId) { "A non-null value must be provided for metadataTransferJobId" }
    /**
     * The metadata transfer job's progress.
     */
    public val progress: aws.sdk.kotlin.services.iottwinmaker.model.MetadataTransferJobProgress? = builder.progress
    /**
     * The metadata transfer job's status.
     */
    public val status: aws.sdk.kotlin.services.iottwinmaker.model.MetadataTransferJobStatus? = builder.status
    /**
     * Used to update the DateTime property.
     */
    public val updateDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateDateTime) { "A non-null value must be provided for updateDateTime" }

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

    override fun toString(): kotlin.String = buildString {
        append("CancelMetadataTransferJobResponse(")
        append("arn=$arn,")
        append("metadataTransferJobId=$metadataTransferJobId,")
        append("progress=$progress,")
        append("status=$status,")
        append("updateDateTime=$updateDateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (metadataTransferJobId.hashCode())
        result = 31 * result + (progress?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (updateDateTime.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 CancelMetadataTransferJobResponse

        if (arn != other.arn) return false
        if (metadataTransferJobId != other.metadataTransferJobId) return false
        if (progress != other.progress) return false
        if (status != other.status) return false
        if (updateDateTime != other.updateDateTime) return false

        return true
    }

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

    public class Builder {
        /**
         * The metadata transfer job ARN.
         */
        public var arn: kotlin.String? = null
        /**
         * The metadata transfer job Id.
         */
        public var metadataTransferJobId: kotlin.String? = null
        /**
         * The metadata transfer job's progress.
         */
        public var progress: aws.sdk.kotlin.services.iottwinmaker.model.MetadataTransferJobProgress? = null
        /**
         * The metadata transfer job's status.
         */
        public var status: aws.sdk.kotlin.services.iottwinmaker.model.MetadataTransferJobStatus? = null
        /**
         * Used to update the DateTime property.
         */
        public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.CancelMetadataTransferJobResponse) : this() {
            this.arn = x.arn
            this.metadataTransferJobId = x.metadataTransferJobId
            this.progress = x.progress
            this.status = x.status
            this.updateDateTime = x.updateDateTime
        }

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

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

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (metadataTransferJobId == null) metadataTransferJobId = ""
            if (updateDateTime == null) updateDateTime = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy