commonMain.aws.sdk.kotlin.services.glue.model.SchemaVersionErrorItem.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 object that contains the error details for an operation on a schema version.
*/
public class SchemaVersionErrorItem private constructor(builder: Builder) {
/**
* The details of the error for the schema version.
*/
public val errorDetails: aws.sdk.kotlin.services.glue.model.ErrorDetails? = builder.errorDetails
/**
* The version number of the schema.
*/
public val versionNumber: kotlin.Long? = builder.versionNumber
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.SchemaVersionErrorItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SchemaVersionErrorItem(")
append("errorDetails=$errorDetails,")
append("versionNumber=$versionNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorDetails?.hashCode() ?: 0
result = 31 * result + (versionNumber?.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 SchemaVersionErrorItem
if (errorDetails != other.errorDetails) return false
if (versionNumber != other.versionNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.SchemaVersionErrorItem = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The details of the error for the schema version.
*/
public var errorDetails: aws.sdk.kotlin.services.glue.model.ErrorDetails? = null
/**
* The version number of the schema.
*/
public var versionNumber: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.SchemaVersionErrorItem) : this() {
this.errorDetails = x.errorDetails
this.versionNumber = x.versionNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.SchemaVersionErrorItem = SchemaVersionErrorItem(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.ErrorDetails] inside the given [block]
*/
public fun errorDetails(block: aws.sdk.kotlin.services.glue.model.ErrorDetails.Builder.() -> kotlin.Unit) {
this.errorDetails = aws.sdk.kotlin.services.glue.model.ErrorDetails.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}