commonMain.aws.sdk.kotlin.services.glue.model.TableVersion.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies a version of a table.
*/
public class TableVersion private constructor(builder: Builder) {
/**
* The table in question.
*/
public val table: aws.sdk.kotlin.services.glue.model.Table? = builder.table
/**
* The ID value that identifies this table version. A `VersionId` is a string representation of an integer. Each version is incremented by 1.
*/
public val versionId: kotlin.String? = builder.versionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TableVersion = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TableVersion(")
append("table=$table,")
append("versionId=$versionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = table?.hashCode() ?: 0
result = 31 * result + (versionId?.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 TableVersion
if (table != other.table) return false
if (versionId != other.versionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TableVersion = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The table in question.
*/
public var table: aws.sdk.kotlin.services.glue.model.Table? = null
/**
* The ID value that identifies this table version. A `VersionId` is a string representation of an integer. Each version is incremented by 1.
*/
public var versionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TableVersion) : this() {
this.table = x.table
this.versionId = x.versionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TableVersion = TableVersion(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.Table] inside the given [block]
*/
public fun table(block: aws.sdk.kotlin.services.glue.model.Table.Builder.() -> kotlin.Unit) {
this.table = aws.sdk.kotlin.services.glue.model.Table.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}