
commonMain.aws.sdk.kotlin.services.route53resolver.model.InvalidParameterException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53resolver.model
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* One or more parameters in this request are not valid.
*/
public class InvalidParameterException private constructor(builder: Builder) : Route53ResolverException() {
/**
* For an `InvalidParameterException` error, the name of the parameter that's invalid.
*/
public val fieldName: kotlin.String? = builder.fieldName
override val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53resolver.model.InvalidParameterException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InvalidParameterException(")
append("fieldName=$fieldName,")
append("message=$message")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = fieldName?.hashCode() ?: 0
result = 31 * result + (message.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 InvalidParameterException
if (fieldName != other.fieldName) return false
if (message != other.message) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53resolver.model.InvalidParameterException = Builder(this).apply(block).build()
public class Builder {
/**
* For an `InvalidParameterException` error, the name of the parameter that's invalid.
*/
public var fieldName: kotlin.String? = null
public var message: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53resolver.model.InvalidParameterException) : this() {
this.fieldName = x.fieldName
this.message = x.message
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53resolver.model.InvalidParameterException = InvalidParameterException(this)
internal fun correctErrors(): Builder {
if (message == null) message = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy