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

commonMain.aws.sdk.kotlin.services.redshift.model.RevisionTarget.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.redshift.model

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

/**
 * Describes a `RevisionTarget`.
 */
public class RevisionTarget private constructor(builder: Builder) {
    /**
     * A unique string that identifies the version to update the cluster to. You can use this value in ModifyClusterDbRevision.
     */
    public val databaseRevision: kotlin.String? = builder.databaseRevision
    /**
     * The date on which the database revision was released.
     */
    public val databaseRevisionReleaseDate: aws.smithy.kotlin.runtime.time.Instant? = builder.databaseRevisionReleaseDate
    /**
     * A string that describes the changes and features that will be applied to the cluster when it is updated to the corresponding ClusterDbRevision.
     */
    public val description: kotlin.String? = builder.description

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

    override fun toString(): kotlin.String = buildString {
        append("RevisionTarget(")
        append("databaseRevision=$databaseRevision,")
        append("databaseRevisionReleaseDate=$databaseRevisionReleaseDate,")
        append("description=$description")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = databaseRevision?.hashCode() ?: 0
        result = 31 * result + (databaseRevisionReleaseDate?.hashCode() ?: 0)
        result = 31 * result + (description?.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 RevisionTarget

        if (databaseRevision != other.databaseRevision) return false
        if (databaseRevisionReleaseDate != other.databaseRevisionReleaseDate) return false
        if (description != other.description) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique string that identifies the version to update the cluster to. You can use this value in ModifyClusterDbRevision.
         */
        public var databaseRevision: kotlin.String? = null
        /**
         * The date on which the database revision was released.
         */
        public var databaseRevisionReleaseDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A string that describes the changes and features that will be applied to the cluster when it is updated to the corresponding ClusterDbRevision.
         */
        public var description: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.RevisionTarget) : this() {
            this.databaseRevision = x.databaseRevision
            this.databaseRevisionReleaseDate = x.databaseRevisionReleaseDate
            this.description = x.description
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy