commonMain.aws.sdk.kotlin.services.datazone.model.DataSourceErrorMessage.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datazone-jvm Show documentation
Show all versions of datazone-jvm Show documentation
The AWS SDK for Kotlin client for DataZone
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datazone.model
/**
* The details of the error message that is returned if the operation cannot be successfully completed.
*/
public class DataSourceErrorMessage private constructor(builder: Builder) {
/**
* The details of the error message that is returned if the operation cannot be successfully completed.
*/
public val errorDetail: kotlin.String? = builder.errorDetail
/**
* The type of the error message that is returned if the operation cannot be successfully completed.
*/
public val errorType: aws.sdk.kotlin.services.datazone.model.DataSourceErrorType = requireNotNull(builder.errorType) { "A non-null value must be provided for errorType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.datazone.model.DataSourceErrorMessage = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DataSourceErrorMessage(")
append("errorDetail=$errorDetail,")
append("errorType=$errorType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorDetail?.hashCode() ?: 0
result = 31 * result + (errorType.hashCode())
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 DataSourceErrorMessage
if (errorDetail != other.errorDetail) return false
if (errorType != other.errorType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datazone.model.DataSourceErrorMessage = Builder(this).apply(block).build()
public class Builder {
/**
* The details of the error message that is returned if the operation cannot be successfully completed.
*/
public var errorDetail: kotlin.String? = null
/**
* The type of the error message that is returned if the operation cannot be successfully completed.
*/
public var errorType: aws.sdk.kotlin.services.datazone.model.DataSourceErrorType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.datazone.model.DataSourceErrorMessage) : this() {
this.errorDetail = x.errorDetail
this.errorType = x.errorType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.datazone.model.DataSourceErrorMessage = DataSourceErrorMessage(this)
internal fun correctErrors(): Builder {
if (errorType == null) errorType = DataSourceErrorType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy