
commonMain.aws.sdk.kotlin.services.connectcases.model.FieldOptionError.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
/**
* Object for field Options errors.
*/
public class FieldOptionError private constructor(builder: Builder) {
/**
* Error code from creating or updating field option.
*/
public val errorCode: kotlin.String = requireNotNull(builder.errorCode) { "A non-null value must be provided for errorCode" }
/**
* Error message from creating or updating field option.
*/
public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
/**
* The field option value that caused the error.
*/
public val value: kotlin.String = requireNotNull(builder.value) { "A non-null value must be provided for value" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.FieldOptionError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FieldOptionError(")
append("errorCode=$errorCode,")
append("message=$message,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorCode.hashCode()
result = 31 * result + (message.hashCode())
result = 31 * result + (value.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 FieldOptionError
if (errorCode != other.errorCode) return false
if (message != other.message) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.FieldOptionError = Builder(this).apply(block).build()
public class Builder {
/**
* Error code from creating or updating field option.
*/
public var errorCode: kotlin.String? = null
/**
* Error message from creating or updating field option.
*/
public var message: kotlin.String? = null
/**
* The field option value that caused the error.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.FieldOptionError) : this() {
this.errorCode = x.errorCode
this.message = x.message
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.FieldOptionError = FieldOptionError(this)
internal fun correctErrors(): Builder {
if (errorCode == null) errorCode = ""
if (message == null) message = ""
if (value == null) value = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy