commonMain.aws.sdk.kotlin.services.tnb.model.ErrorInfo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tnb-jvm Show documentation
Show all versions of tnb-jvm Show documentation
The AWS SDK for Kotlin client for tnb
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.tnb.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Provides error information.
*/
public class ErrorInfo private constructor(builder: Builder) {
/**
* Error cause.
*/
public val cause: kotlin.String? = builder.cause
/**
* Error details.
*/
public val details: kotlin.String? = builder.details
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.tnb.model.ErrorInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ErrorInfo(")
append("cause=$cause,")
append("details=$details")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cause?.hashCode() ?: 0
result = 31 * result + (details?.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 ErrorInfo
if (cause != other.cause) return false
if (details != other.details) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.tnb.model.ErrorInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Error cause.
*/
public var cause: kotlin.String? = null
/**
* Error details.
*/
public var details: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.tnb.model.ErrorInfo) : this() {
this.cause = x.cause
this.details = x.details
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.tnb.model.ErrorInfo = ErrorInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}