commonMain.aws.sdk.kotlin.services.glue.model.PartitionError.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
/**
* Contains information about a partition error.
*/
public class PartitionError private constructor(builder: Builder) {
/**
* The details about the partition error.
*/
public val errorDetail: aws.sdk.kotlin.services.glue.model.ErrorDetail? = builder.errorDetail
/**
* The values that define the partition.
*/
public val partitionValues: List? = builder.partitionValues
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.PartitionError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PartitionError(")
append("errorDetail=$errorDetail,")
append("partitionValues=$partitionValues")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorDetail?.hashCode() ?: 0
result = 31 * result + (partitionValues?.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 PartitionError
if (errorDetail != other.errorDetail) return false
if (partitionValues != other.partitionValues) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.PartitionError = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The details about the partition error.
*/
public var errorDetail: aws.sdk.kotlin.services.glue.model.ErrorDetail? = null
/**
* The values that define the partition.
*/
public var partitionValues: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.PartitionError) : this() {
this.errorDetail = x.errorDetail
this.partitionValues = x.partitionValues
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.PartitionError = PartitionError(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
}
}
}