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

commonMain.aws.sdk.kotlin.services.migrationhub.model.NotifyMigrationTaskStateRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.migrationhub.model

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

public class NotifyMigrationTaskStateRequest private constructor(builder: Builder) {
    /**
     * Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
     */
    public val dryRun: kotlin.Boolean? = builder.dryRun
    /**
     * Unique identifier that references the migration task. *Do not store personal data in this field.*
     */
    public val migrationTaskName: kotlin.String? = builder.migrationTaskName
    /**
     * Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.
     */
    public val nextUpdateSeconds: kotlin.Int? = builder.nextUpdateSeconds
    /**
     * The name of the ProgressUpdateStream.
     */
    public val progressUpdateStream: kotlin.String? = builder.progressUpdateStream
    /**
     * Information about the task's progress and status.
     */
    public val task: aws.sdk.kotlin.services.migrationhub.model.Task? = builder.task
    /**
     * The timestamp when the task was gathered.
     */
    public val updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.updateDateTime

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

    override fun toString(): kotlin.String = buildString {
        append("NotifyMigrationTaskStateRequest(")
        append("dryRun=$dryRun,")
        append("migrationTaskName=$migrationTaskName,")
        append("nextUpdateSeconds=$nextUpdateSeconds,")
        append("progressUpdateStream=$progressUpdateStream,")
        append("task=$task,")
        append("updateDateTime=$updateDateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dryRun?.hashCode() ?: 0
        result = 31 * result + (migrationTaskName?.hashCode() ?: 0)
        result = 31 * result + (nextUpdateSeconds ?: 0)
        result = 31 * result + (progressUpdateStream?.hashCode() ?: 0)
        result = 31 * result + (task?.hashCode() ?: 0)
        result = 31 * result + (updateDateTime?.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 NotifyMigrationTaskStateRequest

        if (dryRun != other.dryRun) return false
        if (migrationTaskName != other.migrationTaskName) return false
        if (nextUpdateSeconds != other.nextUpdateSeconds) return false
        if (progressUpdateStream != other.progressUpdateStream) return false
        if (task != other.task) return false
        if (updateDateTime != other.updateDateTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
         */
        public var dryRun: kotlin.Boolean? = null
        /**
         * Unique identifier that references the migration task. *Do not store personal data in this field.*
         */
        public var migrationTaskName: kotlin.String? = null
        /**
         * Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.
         */
        public var nextUpdateSeconds: kotlin.Int? = null
        /**
         * The name of the ProgressUpdateStream.
         */
        public var progressUpdateStream: kotlin.String? = null
        /**
         * Information about the task's progress and status.
         */
        public var task: aws.sdk.kotlin.services.migrationhub.model.Task? = null
        /**
         * The timestamp when the task was gathered.
         */
        public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.migrationhub.model.NotifyMigrationTaskStateRequest) : this() {
            this.dryRun = x.dryRun
            this.migrationTaskName = x.migrationTaskName
            this.nextUpdateSeconds = x.nextUpdateSeconds
            this.progressUpdateStream = x.progressUpdateStream
            this.task = x.task
            this.updateDateTime = x.updateDateTime
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy