smithy4s.com.amazonaws.kinesis.KMSInvalidStateException.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 request was rejected because the state of the specified resource isn't valid for
* this request. For more information, see How Key State Affects Use of a
* Customer Master Key in the Amazon Web Services Key Management
* Service Developer Guide.
* @param message
* A message that provides information about the error.
*/
final case class KMSInvalidStateException(message: Option[ErrorMessage] = None) extends Smithy4sThrowable {
override def getMessage(): String = message.map(_.value).orNull
}
object KMSInvalidStateException extends ShapeTag.Companion[KMSInvalidStateException] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "KMSInvalidStateException")
val hints: Hints = Hints(
smithy.api.Error.CLIENT.widen,
smithy.api.Documentation("The request was rejected because the state of the specified resource isn\'t valid for\n this request. For more information, see How Key State Affects Use of a\n Customer Master Key in the Amazon Web Services Key Management\n Service Developer Guide.
"),
).lazily
// constructor using the original order from the spec
private def make(message: Option[ErrorMessage]): KMSInvalidStateException = KMSInvalidStateException(message)
implicit val schema: Schema[KMSInvalidStateException] = struct(
ErrorMessage.schema.optional[KMSInvalidStateException]("message", _.message).addHints(smithy.api.Documentation("A message that provides information about the error.
")),
)(make).withId(id).addHints(hints)
}