smithy4s.com.amazonaws.kinesis.InternalFailureException.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesis4cats-smithy4s-client_sjs1_3 Show documentation
Show all versions of kinesis4cats-smithy4s-client_sjs1_3 Show documentation
Cats tooling for the Smithy4s Kinesis Client
package com.amazonaws.kinesis
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.Smithy4sThrowable
import smithy4s.schema.Schema.struct
/** The processing of the request failed because of an unknown error, exception, or
* failure.
*/
final case class InternalFailureException(message: Option[ErrorMessage] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.map(_.value).orNull
}
object InternalFailureException extends ShapeTag.Companion[InternalFailureException] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "InternalFailureException")
val hints: Hints = Hints(
smithy.api.Error.SERVER.widen,
smithy.api.Documentation("The processing of the request failed because of an unknown error, exception, or\n failure.
"),
).lazily
// constructor using the original order from the spec
private def make(message: Option[ErrorMessage]): InternalFailureException = InternalFailureException(message)
implicit val schema: Schema[InternalFailureException] = struct(
ErrorMessage.schema.optional[InternalFailureException]("message", _.message),
)(make).withId(id).addHints(hints)
}