commonMain.aws.sdk.kotlin.services.glue.model.UpdateTableRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateTableRequest private constructor(builder: Builder) {
/**
* The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.
*/
public val catalogId: kotlin.String? = builder.catalogId
/**
* The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.
*/
public val databaseName: kotlin.String? = builder.databaseName
/**
* A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.
*/
public val force: kotlin.Boolean? = builder.force
/**
* By default, `UpdateTable` always creates an archived version of the table before updating it. However, if `skipArchive` is set to true, `UpdateTable` does not create the archived version.
*/
public val skipArchive: kotlin.Boolean? = builder.skipArchive
/**
* An updated `TableInput` object to define the metadata table in the catalog.
*/
public val tableInput: aws.sdk.kotlin.services.glue.model.TableInput? = builder.tableInput
/**
* The transaction ID at which to update the table contents.
*/
public val transactionId: kotlin.String? = builder.transactionId
/**
* The version ID at which to update the table contents.
*/
public val versionId: kotlin.String? = builder.versionId
/**
* The operation to be performed when updating the view.
*/
public val viewUpdateAction: aws.sdk.kotlin.services.glue.model.ViewUpdateAction? = builder.viewUpdateAction
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.UpdateTableRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateTableRequest(")
append("catalogId=$catalogId,")
append("databaseName=$databaseName,")
append("force=$force,")
append("skipArchive=$skipArchive,")
append("tableInput=$tableInput,")
append("transactionId=$transactionId,")
append("versionId=$versionId,")
append("viewUpdateAction=$viewUpdateAction")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = catalogId?.hashCode() ?: 0
result = 31 * result + (databaseName?.hashCode() ?: 0)
result = 31 * result + (force?.hashCode() ?: 0)
result = 31 * result + (skipArchive?.hashCode() ?: 0)
result = 31 * result + (tableInput?.hashCode() ?: 0)
result = 31 * result + (transactionId?.hashCode() ?: 0)
result = 31 * result + (versionId?.hashCode() ?: 0)
result = 31 * result + (viewUpdateAction?.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 UpdateTableRequest
if (catalogId != other.catalogId) return false
if (databaseName != other.databaseName) return false
if (force != other.force) return false
if (skipArchive != other.skipArchive) return false
if (tableInput != other.tableInput) return false
if (transactionId != other.transactionId) return false
if (versionId != other.versionId) return false
if (viewUpdateAction != other.viewUpdateAction) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.UpdateTableRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.
*/
public var catalogId: kotlin.String? = null
/**
* The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.
*/
public var databaseName: kotlin.String? = null
/**
* A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.
*/
public var force: kotlin.Boolean? = null
/**
* By default, `UpdateTable` always creates an archived version of the table before updating it. However, if `skipArchive` is set to true, `UpdateTable` does not create the archived version.
*/
public var skipArchive: kotlin.Boolean? = null
/**
* An updated `TableInput` object to define the metadata table in the catalog.
*/
public var tableInput: aws.sdk.kotlin.services.glue.model.TableInput? = null
/**
* The transaction ID at which to update the table contents.
*/
public var transactionId: kotlin.String? = null
/**
* The version ID at which to update the table contents.
*/
public var versionId: kotlin.String? = null
/**
* The operation to be performed when updating the view.
*/
public var viewUpdateAction: aws.sdk.kotlin.services.glue.model.ViewUpdateAction? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.UpdateTableRequest) : this() {
this.catalogId = x.catalogId
this.databaseName = x.databaseName
this.force = x.force
this.skipArchive = x.skipArchive
this.tableInput = x.tableInput
this.transactionId = x.transactionId
this.versionId = x.versionId
this.viewUpdateAction = x.viewUpdateAction
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.UpdateTableRequest = UpdateTableRequest(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.TableInput] inside the given [block]
*/
public fun tableInput(block: aws.sdk.kotlin.services.glue.model.TableInput.Builder.() -> kotlin.Unit) {
this.tableInput = aws.sdk.kotlin.services.glue.model.TableInput.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}