commonMain.aws.sdk.kotlin.services.glue.model.ColumnError.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
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Encapsulates a column name that failed and the reason for failure.
*/
public class ColumnError private constructor(builder: Builder) {
/**
* The name of the column that failed.
*/
public val columnName: kotlin.String? = builder.columnName
/**
* An error message with the reason for the failure of an operation.
*/
public val error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = builder.error
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.ColumnError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ColumnError(")
append("columnName=$columnName,")
append("error=$error")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = columnName?.hashCode() ?: 0
result = 31 * result + (error?.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 ColumnError
if (columnName != other.columnName) return false
if (error != other.error) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ColumnError = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the column that failed.
*/
public var columnName: kotlin.String? = null
/**
* An error message with the reason for the failure of an operation.
*/
public var error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.ColumnError) : this() {
this.columnName = x.columnName
this.error = x.error
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.ColumnError = ColumnError(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.ErrorDetail] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.glue.model.ErrorDetail.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.glue.model.ErrorDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}