/
InternalServerError.scala
32 lines (26 loc) · 1.26 KB
/
InternalServerError.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.amazonaws.dynamodb
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.Smithy4sThrowable
import smithy4s.schema.Schema.struct
/** <p>An error occurred on the server side.</p>
* @param message
* <p>The server encountered an internal error trying to fulfill the request.</p>
*/
final case class InternalServerError(message: Option[ErrorMessage] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.map(_.value).orNull
}
object InternalServerError extends ShapeTag.Companion[InternalServerError] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "InternalServerError")
val hints: Hints = Hints(
smithy.api.Documentation("<p>An error occurred on the server side.</p>"),
smithy.api.Error.SERVER.widen,
).lazily
// constructor using the original order from the spec
private def make(message: Option[ErrorMessage]): InternalServerError = InternalServerError(message)
implicit val schema: Schema[InternalServerError] = struct(
ErrorMessage.schema.optional[InternalServerError]("message", _.message).addHints(smithy.api.Documentation("<p>The server encountered an internal error trying to fulfill the request.</p>")),
)(make).withId(id).addHints(hints)
}