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

commonMain.aws.sdk.kotlin.services.apptest.model.CompareDatabaseCdcStepInput.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.apptest.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Compares the database Change Data Capture (CDC) step input.
 */
public class CompareDatabaseCdcStepInput private constructor(builder: Builder) {
    /**
     * The output location of the compare database CDC step input.
     */
    public val outputLocation: kotlin.String? = builder.outputLocation
    /**
     * The source location of the compare database CDC step input.
     */
    public val sourceLocation: kotlin.String = requireNotNull(builder.sourceLocation) { "A non-null value must be provided for sourceLocation" }
    /**
     * The source metadata of the compare database CDC step input.
     */
    public val sourceMetadata: aws.sdk.kotlin.services.apptest.model.SourceDatabaseMetadata? = builder.sourceMetadata
    /**
     * The target location of the compare database CDC step input.
     */
    public val targetLocation: kotlin.String = requireNotNull(builder.targetLocation) { "A non-null value must be provided for targetLocation" }
    /**
     * The target metadata location of the compare database CDC step input.
     */
    public val targetMetadata: aws.sdk.kotlin.services.apptest.model.TargetDatabaseMetadata? = builder.targetMetadata

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

    override fun toString(): kotlin.String = buildString {
        append("CompareDatabaseCdcStepInput(")
        append("outputLocation=$outputLocation,")
        append("sourceLocation=$sourceLocation,")
        append("sourceMetadata=$sourceMetadata,")
        append("targetLocation=$targetLocation,")
        append("targetMetadata=$targetMetadata")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = outputLocation?.hashCode() ?: 0
        result = 31 * result + (sourceLocation.hashCode())
        result = 31 * result + (sourceMetadata?.hashCode() ?: 0)
        result = 31 * result + (targetLocation.hashCode())
        result = 31 * result + (targetMetadata?.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 CompareDatabaseCdcStepInput

        if (outputLocation != other.outputLocation) return false
        if (sourceLocation != other.sourceLocation) return false
        if (sourceMetadata != other.sourceMetadata) return false
        if (targetLocation != other.targetLocation) return false
        if (targetMetadata != other.targetMetadata) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The output location of the compare database CDC step input.
         */
        public var outputLocation: kotlin.String? = null
        /**
         * The source location of the compare database CDC step input.
         */
        public var sourceLocation: kotlin.String? = null
        /**
         * The source metadata of the compare database CDC step input.
         */
        public var sourceMetadata: aws.sdk.kotlin.services.apptest.model.SourceDatabaseMetadata? = null
        /**
         * The target location of the compare database CDC step input.
         */
        public var targetLocation: kotlin.String? = null
        /**
         * The target metadata location of the compare database CDC step input.
         */
        public var targetMetadata: aws.sdk.kotlin.services.apptest.model.TargetDatabaseMetadata? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.apptest.model.CompareDatabaseCdcStepInput) : this() {
            this.outputLocation = x.outputLocation
            this.sourceLocation = x.sourceLocation
            this.sourceMetadata = x.sourceMetadata
            this.targetLocation = x.targetLocation
            this.targetMetadata = x.targetMetadata
        }

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

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

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

        internal fun correctErrors(): Builder {
            if (sourceLocation == null) sourceLocation = ""
            if (targetLocation == null) targetLocation = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy