commonMain.aws.sdk.kotlin.services.glue.model.TableError.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
/**
* An error record for table operations.
*/
public class TableError private constructor(builder: Builder) {
/**
* The details about the error.
*/
public val errorDetail: aws.sdk.kotlin.services.glue.model.ErrorDetail? = builder.errorDetail
/**
* The name of the table. For Hive compatibility, this must be entirely lowercase.
*/
public val tableName: kotlin.String? = builder.tableName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TableError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TableError(")
append("errorDetail=$errorDetail,")
append("tableName=$tableName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorDetail?.hashCode() ?: 0
result = 31 * result + (tableName?.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 TableError
if (errorDetail != other.errorDetail) return false
if (tableName != other.tableName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TableError = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The details about the error.
*/
public var errorDetail: aws.sdk.kotlin.services.glue.model.ErrorDetail? = null
/**
* The name of the table. For Hive compatibility, this must be entirely lowercase.
*/
public var tableName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TableError) : this() {
this.errorDetail = x.errorDetail
this.tableName = x.tableName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TableError = TableError(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.ErrorDetail] inside the given [block]
*/
public fun errorDetail(block: aws.sdk.kotlin.services.glue.model.ErrorDetail.Builder.() -> kotlin.Unit) {
this.errorDetail = aws.sdk.kotlin.services.glue.model.ErrorDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}