
commonMain.aws.sdk.kotlin.services.voiceid.model.FailureDetails.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.voiceid.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains error details for a failed batch job.
*/
public class FailureDetails private constructor(builder: Builder) {
/**
* A description of the error that caused the batch job failure.
*/
public val message: kotlin.String? = builder.message
/**
* An HTTP status code representing the nature of the error.
*/
public val statusCode: kotlin.Int? = builder.statusCode
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.voiceid.model.FailureDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FailureDetails(")
append("message=$message,")
append("statusCode=$statusCode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = message?.hashCode() ?: 0
result = 31 * result + (statusCode ?: 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 FailureDetails
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.voiceid.model.FailureDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description of the error that caused the batch job failure.
*/
public var message: kotlin.String? = null
/**
* An HTTP status code representing the nature of the error.
*/
public var statusCode: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.voiceid.model.FailureDetails) : this() {
this.message = x.message
this.statusCode = x.statusCode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.voiceid.model.FailureDetails = FailureDetails(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy