smithy4s.kinesis4cats.kcl.http4s.generated.ServiceNotReadyError.scala Maven / Gradle / Ivy
The newest version!
package kinesis4cats.kcl.http4s.generated
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.Smithy4sThrowable
import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct
final case class ServiceNotReadyError(message: Option[String] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.orNull
}
object ServiceNotReadyError extends ShapeTag.Companion[ServiceNotReadyError] {
val id: ShapeId = ShapeId("kinesis4cats.kcl.http4s.generated", "ServiceNotReadyError")
val hints: Hints = Hints(
smithy.api.Error.SERVER.widen,
smithy.api.HttpError(503),
).lazily
// constructor using the original order from the spec
private def make(message: Option[String]): ServiceNotReadyError = ServiceNotReadyError(message)
implicit val schema: Schema[ServiceNotReadyError] = struct(
string.optional[ServiceNotReadyError]("message", _.message),
)(make).withId(id).addHints(hints)
}