
commonMain.aws.sdk.kotlin.services.mgn.model.ConflictException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.mgn.model
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The request could not be completed due to a conflict with the current state of the target resource.
*/
class ConflictException private constructor(builder: Builder) : MgnException() {
val code: kotlin.String? = builder.code
/**
* Conflict Exception specific errors.
*/
val errors: List? = builder.errors
override val message: kotlin.String? = builder.message
/**
* A conflict occurred when prompting for the Resource ID.
*/
val resourceId: kotlin.String? = builder.resourceId
/**
* A conflict occurred when prompting for resource type.
*/
val resourceType: kotlin.String? = builder.resourceType
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mgn.model.ConflictException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConflictException(")
append("code=$code,")
append("errors=$errors,")
append("message=$message,")
append("resourceId=$resourceId,")
append("resourceType=$resourceType)")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (errors?.hashCode() ?: 0)
result = 31 * result + (message?.hashCode() ?: 0)
result = 31 * result + (resourceId?.hashCode() ?: 0)
result = 31 * result + (resourceType?.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 ConflictException
if (code != other.code) return false
if (errors != other.errors) return false
if (message != other.message) return false
if (resourceId != other.resourceId) return false
if (resourceType != other.resourceType) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mgn.model.ConflictException = Builder(this).apply(block).build()
class Builder {
var code: kotlin.String? = null
/**
* Conflict Exception specific errors.
*/
var errors: List? = null
var message: kotlin.String? = null
/**
* A conflict occurred when prompting for the Resource ID.
*/
var resourceId: kotlin.String? = null
/**
* A conflict occurred when prompting for resource type.
*/
var resourceType: kotlin.String? = null
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.mgn.model.ConflictException) : this() {
this.code = x.code
this.errors = x.errors
this.message = x.message
this.resourceId = x.resourceId
this.resourceType = x.resourceType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.mgn.model.ConflictException = ConflictException(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy