smithy4s.com.amazonaws.kinesis.ValidationException.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesis4cats-smithy4s-client_sjs1_2.13 Show documentation
Show all versions of kinesis4cats-smithy4s-client_sjs1_2.13 Show documentation
Cats tooling for the Smithy4s Kinesis Client
The newest version!
package com.amazonaws.kinesis
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.Smithy4sThrowable
import smithy4s.schema.Schema.struct
/** Specifies that you tried to invoke this API for a data stream with the on-demand
* capacity mode. This API is only supported for data streams with the provisioned capacity
* mode.
*/
final case class ValidationException(message: Option[ErrorMessage] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.map(_.value).orNull
}
object ValidationException extends ShapeTag.Companion[ValidationException] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ValidationException")
val hints: Hints = Hints(
smithy.api.Error.CLIENT.widen,
smithy.api.Documentation("Specifies that you tried to invoke this API for a data stream with the on-demand\n capacity mode. This API is only supported for data streams with the provisioned capacity\n mode.
"),
).lazily
// constructor using the original order from the spec
private def make(message: Option[ErrorMessage]): ValidationException = ValidationException(message)
implicit val schema: Schema[ValidationException] = struct(
ErrorMessage.schema.optional[ValidationException]("message", _.message),
)(make).withId(id).addHints(hints)
}