
commonMain.aws.sdk.kotlin.services.neptunedata.model.MalformedQueryException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.neptunedata.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* Raised when a query is submitted that is syntactically incorrect or does not pass additional validation.
*/
public class MalformedQueryException private constructor(builder: Builder) : NeptunedataException() {
/**
* The HTTP status code returned with the exception.
*/
public val code: kotlin.String = requireNotNull(builder.code) { "A non-null value must be provided for code" }
/**
* A detailed message describing the problem.
*/
public val detailedMessage: kotlin.String = requireNotNull(builder.detailedMessage) { "A non-null value must be provided for detailedMessage" }
/**
* The ID of the malformed query request.
*/
public val requestId: kotlin.String = requireNotNull(builder.requestId) { "A non-null value must be provided for requestId" }
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.neptunedata.model.MalformedQueryException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MalformedQueryException(")
append("code=$code,")
append("detailedMessage=$detailedMessage,")
append("requestId=$requestId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code.hashCode()
result = 31 * result + (detailedMessage.hashCode())
result = 31 * result + (requestId.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 MalformedQueryException
if (code != other.code) return false
if (detailedMessage != other.detailedMessage) return false
if (requestId != other.requestId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.neptunedata.model.MalformedQueryException = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The HTTP status code returned with the exception.
*/
public var code: kotlin.String? = null
/**
* A detailed message describing the problem.
*/
public var detailedMessage: kotlin.String? = null
/**
* The ID of the malformed query request.
*/
public var requestId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.neptunedata.model.MalformedQueryException) : this() {
this.code = x.code
this.detailedMessage = x.detailedMessage
this.requestId = x.requestId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.neptunedata.model.MalformedQueryException = MalformedQueryException(this)
internal fun correctErrors(): Builder {
if (code == null) code = ""
if (detailedMessage == null) detailedMessage = ""
if (requestId == null) requestId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy