smithy4s.com.amazonaws.kinesis.ExpiredIteratorException.scala Maven / Gradle / Ivy
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 provided iterator exceeds the maximum age allowed.
* @param message
* A message that provides information about the error.
*/
final case class ExpiredIteratorException(message: Option[ErrorMessage] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.map(_.value).orNull
}
object ExpiredIteratorException extends ShapeTag.Companion[ExpiredIteratorException] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ExpiredIteratorException")
val hints: Hints = Hints(
smithy.api.Error.CLIENT.widen,
smithy.api.Documentation("The provided iterator exceeds the maximum age allowed.
"),
).lazily
// constructor using the original order from the spec
private def make(message: Option[ErrorMessage]): ExpiredIteratorException = ExpiredIteratorException(message)
implicit val schema: Schema[ExpiredIteratorException] = struct(
ErrorMessage.schema.optional[ExpiredIteratorException]("message", _.message).addHints(smithy.api.Documentation("A message that provides information about the error.
")),
)(make).withId(id).addHints(hints)
}