commonMain.aws.sdk.kotlin.services.tnb.model.ProblemDetails.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
/**
* Details related to problems with AWS TNB resources.
*/
public class ProblemDetails private constructor(builder: Builder) {
/**
* A human-readable explanation specific to this occurrence of the problem.
*/
public val detail: kotlin.String = requireNotNull(builder.detail) { "A non-null value must be provided for detail" }
/**
* A human-readable title of the problem type.
*/
public val title: kotlin.String? = builder.title
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.tnb.model.ProblemDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ProblemDetails(")
append("detail=$detail,")
append("title=$title")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = detail.hashCode()
result = 31 * result + (title?.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 ProblemDetails
if (detail != other.detail) return false
if (title != other.title) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.tnb.model.ProblemDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A human-readable explanation specific to this occurrence of the problem.
*/
public var detail: kotlin.String? = null
/**
* A human-readable title of the problem type.
*/
public var title: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.tnb.model.ProblemDetails) : this() {
this.detail = x.detail
this.title = x.title
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.tnb.model.ProblemDetails = ProblemDetails(this)
internal fun correctErrors(): Builder {
if (detail == null) detail = ""
return this
}
}
}