smithy4s.com.amazonaws.kinesis.ResourceInUseException.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_native0.4_3 Show documentation
Show all versions of kinesis4cats-smithy4s-client_native0.4_3 Show documentation
Cats tooling for the Smithy4s Kinesis Client
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 resource is not available for this operation. For successful operation, the
* resource must be in the ACTIVE
state.
* @param message
* A message that provides information about the error.
*/
final case class ResourceInUseException(message: Option[ErrorMessage] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.map(_.value).orNull
}
object ResourceInUseException extends ShapeTag.Companion[ResourceInUseException] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ResourceInUseException")
val hints: Hints = Hints(
smithy.api.Error.CLIENT.widen,
smithy.api.Documentation("The resource is not available for this operation. For successful operation, the\n resource must be in the ACTIVE
state.
"),
).lazily
// constructor using the original order from the spec
private def make(message: Option[ErrorMessage]): ResourceInUseException = ResourceInUseException(message)
implicit val schema: Schema[ResourceInUseException] = struct(
ErrorMessage.schema.optional[ResourceInUseException]("message", _.message).addHints(smithy.api.Documentation("A message that provides information about the error.
")),
)(make).withId(id).addHints(hints)
}