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

commonMain.aws.sdk.kotlin.services.migrationhub.model.AssociateCreatedArtifactRequest.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

public class AssociateCreatedArtifactRequest private constructor(builder: Builder) {
    /**
     * An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)
     */
    public val createdArtifact: aws.sdk.kotlin.services.migrationhub.model.CreatedArtifact? = builder.createdArtifact
    /**
     * 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
    /**
     * The name of the ProgressUpdateStream.
     */
    public val progressUpdateStream: kotlin.String? = builder.progressUpdateStream

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

    override fun toString(): kotlin.String = buildString {
        append("AssociateCreatedArtifactRequest(")
        append("createdArtifact=$createdArtifact,")
        append("dryRun=$dryRun,")
        append("migrationTaskName=$migrationTaskName,")
        append("progressUpdateStream=$progressUpdateStream")
        append(")")
    }

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

        if (createdArtifact != other.createdArtifact) return false
        if (dryRun != other.dryRun) return false
        if (migrationTaskName != other.migrationTaskName) return false
        if (progressUpdateStream != other.progressUpdateStream) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)
         */
        public var createdArtifact: aws.sdk.kotlin.services.migrationhub.model.CreatedArtifact? = null
        /**
         * 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
        /**
         * The name of the ProgressUpdateStream.
         */
        public var progressUpdateStream: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.migrationhub.model.AssociateCreatedArtifactRequest) : this() {
            this.createdArtifact = x.createdArtifact
            this.dryRun = x.dryRun
            this.migrationTaskName = x.migrationTaskName
            this.progressUpdateStream = x.progressUpdateStream
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy