smithy4s.com.amazonaws.kinesis.ExpiredNextTokenException.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 pagination token passed to the operation is expired.
*/
final case class ExpiredNextTokenException(message: Option[ErrorMessage] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.map(_.value).orNull
}
object ExpiredNextTokenException extends ShapeTag.Companion[ExpiredNextTokenException] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ExpiredNextTokenException")
val hints: Hints = Hints(
smithy.api.Error.CLIENT.widen,
smithy.api.Documentation("The pagination token passed to the operation is expired.
"),
).lazily
// constructor using the original order from the spec
private def make(message: Option[ErrorMessage]): ExpiredNextTokenException = ExpiredNextTokenException(message)
implicit val schema: Schema[ExpiredNextTokenException] = struct(
ErrorMessage.schema.optional[ExpiredNextTokenException]("message", _.message),
)(make).withId(id).addHints(hints)
}