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