commonMain.aws.sdk.kotlin.services.redshift.model.ClusterDbRevision.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
The 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 `ClusterDbRevision`.
*/
public class ClusterDbRevision private constructor(builder: Builder) {
/**
* The unique identifier of the cluster.
*/
public val clusterIdentifier: kotlin.String? = builder.clusterIdentifier
/**
* A string representing the current cluster version.
*/
public val currentDatabaseRevision: kotlin.String? = builder.currentDatabaseRevision
/**
* The date on which the database revision was released.
*/
public val databaseRevisionReleaseDate: aws.smithy.kotlin.runtime.time.Instant? = builder.databaseRevisionReleaseDate
/**
* A list of `RevisionTarget` objects, where each object describes the database revision that a cluster can be updated to.
*/
public val revisionTargets: List? = builder.revisionTargets
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.ClusterDbRevision = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ClusterDbRevision(")
append("clusterIdentifier=$clusterIdentifier,")
append("currentDatabaseRevision=$currentDatabaseRevision,")
append("databaseRevisionReleaseDate=$databaseRevisionReleaseDate,")
append("revisionTargets=$revisionTargets")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clusterIdentifier?.hashCode() ?: 0
result = 31 * result + (currentDatabaseRevision?.hashCode() ?: 0)
result = 31 * result + (databaseRevisionReleaseDate?.hashCode() ?: 0)
result = 31 * result + (revisionTargets?.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 ClusterDbRevision
if (clusterIdentifier != other.clusterIdentifier) return false
if (currentDatabaseRevision != other.currentDatabaseRevision) return false
if (databaseRevisionReleaseDate != other.databaseRevisionReleaseDate) return false
if (revisionTargets != other.revisionTargets) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.ClusterDbRevision = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique identifier of the cluster.
*/
public var clusterIdentifier: kotlin.String? = null
/**
* A string representing the current cluster version.
*/
public var currentDatabaseRevision: kotlin.String? = null
/**
* The date on which the database revision was released.
*/
public var databaseRevisionReleaseDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A list of `RevisionTarget` objects, where each object describes the database revision that a cluster can be updated to.
*/
public var revisionTargets: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.ClusterDbRevision) : this() {
this.clusterIdentifier = x.clusterIdentifier
this.currentDatabaseRevision = x.currentDatabaseRevision
this.databaseRevisionReleaseDate = x.databaseRevisionReleaseDate
this.revisionTargets = x.revisionTargets
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.ClusterDbRevision = ClusterDbRevision(this)
internal fun correctErrors(): Builder {
return this
}
}
}