
commonMain.aws.sdk.kotlin.services.redshiftdata.model.ExecuteStatementException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshiftdata.model
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The SQL statement encountered an environmental error while running.
*/
public class ExecuteStatementException private constructor(builder: Builder) : RedshiftDataException() {
/**
* The exception message.
*/
override val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
/**
* Statement identifier of the exception.
*/
public val statementId: kotlin.String = requireNotNull(builder.statementId) { "A non-null value must be provided for statementId" }
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Server
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshiftdata.model.ExecuteStatementException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExecuteStatementException(")
append("message=$message,")
append("statementId=$statementId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = message.hashCode()
result = 31 * result + (statementId.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 ExecuteStatementException
if (message != other.message) return false
if (statementId != other.statementId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshiftdata.model.ExecuteStatementException = Builder(this).apply(block).build()
public class Builder {
/**
* The exception message.
*/
public var message: kotlin.String? = null
/**
* Statement identifier of the exception.
*/
public var statementId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshiftdata.model.ExecuteStatementException) : this() {
this.message = x.message
this.statementId = x.statementId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshiftdata.model.ExecuteStatementException = ExecuteStatementException(this)
internal fun correctErrors(): Builder {
if (message == null) message = ""
if (statementId == null) statementId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy