commonMain.aws.sdk.kotlin.services.cleanroomsml.model.StatusDetails.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanroomsml-jvm Show documentation
Show all versions of cleanroomsml-jvm Show documentation
The AWS SDK for Kotlin client for CleanRoomsML
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanroomsml.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Details about the status of a resource.
*/
public class StatusDetails private constructor(builder: Builder) {
/**
* The error message that was returned. The message is intended for human consumption and can change at any time. Use the `statusCode` for programmatic error handling.
*/
public val message: kotlin.String? = builder.message
/**
* The status code that was returned. The status code is intended for programmatic error handling. Clean Rooms ML will not change the status code for existing error conditions.
*/
public val statusCode: kotlin.String? = builder.statusCode
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanroomsml.model.StatusDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StatusDetails(")
append("message=$message,")
append("statusCode=$statusCode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = message?.hashCode() ?: 0
result = 31 * result + (statusCode?.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 StatusDetails
if (message != other.message) return false
if (statusCode != other.statusCode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanroomsml.model.StatusDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The error message that was returned. The message is intended for human consumption and can change at any time. Use the `statusCode` for programmatic error handling.
*/
public var message: kotlin.String? = null
/**
* The status code that was returned. The status code is intended for programmatic error handling. Clean Rooms ML will not change the status code for existing error conditions.
*/
public var statusCode: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.StatusDetails) : this() {
this.message = x.message
this.statusCode = x.statusCode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanroomsml.model.StatusDetails = StatusDetails(this)
internal fun correctErrors(): Builder {
return this
}
}
}