All Downloads are FREE. Search and download functionalities are using the official Maven repository.

smithy4s.com.amazonaws.kinesis.SubscribeToShardEventStream.scala Maven / Gradle / Ivy

package com.amazonaws.kinesis

import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.bijection
import smithy4s.schema.Schema.union

/** 

This is a tagged union for all of the types of events an enhanced fan-out consumer can * receive over HTTP/2 after a call to SubscribeToShard.

*/ sealed trait SubscribeToShardEventStream extends scala.Product with scala.Serializable { self => @inline final def widen: SubscribeToShardEventStream = this def $ordinal: Int object project { def subscribeToShardEvent: Option[SubscribeToShardEvent] = SubscribeToShardEventStream.SubscribeToShardEventCase.alt.project.lift(self).map(_.subscribeToShardEvent) def resourceNotFoundException: Option[ResourceNotFoundException] = SubscribeToShardEventStream.ResourceNotFoundExceptionCase.alt.project.lift(self).map(_.resourceNotFoundException) def resourceInUseException: Option[ResourceInUseException] = SubscribeToShardEventStream.ResourceInUseExceptionCase.alt.project.lift(self).map(_.resourceInUseException) def kMSDisabledException: Option[KMSDisabledException] = SubscribeToShardEventStream.KMSDisabledExceptionCase.alt.project.lift(self).map(_.kMSDisabledException) def kMSInvalidStateException: Option[KMSInvalidStateException] = SubscribeToShardEventStream.KMSInvalidStateExceptionCase.alt.project.lift(self).map(_.kMSInvalidStateException) def kMSAccessDeniedException: Option[KMSAccessDeniedException] = SubscribeToShardEventStream.KMSAccessDeniedExceptionCase.alt.project.lift(self).map(_.kMSAccessDeniedException) def kMSNotFoundException: Option[KMSNotFoundException] = SubscribeToShardEventStream.KMSNotFoundExceptionCase.alt.project.lift(self).map(_.kMSNotFoundException) def kMSOptInRequired: Option[KMSOptInRequired] = SubscribeToShardEventStream.KMSOptInRequiredCase.alt.project.lift(self).map(_.kMSOptInRequired) def kMSThrottlingException: Option[KMSThrottlingException] = SubscribeToShardEventStream.KMSThrottlingExceptionCase.alt.project.lift(self).map(_.kMSThrottlingException) def internalFailureException: Option[InternalFailureException] = SubscribeToShardEventStream.InternalFailureExceptionCase.alt.project.lift(self).map(_.internalFailureException) } def accept[A](visitor: SubscribeToShardEventStream.Visitor[A]): A = this match { case value: SubscribeToShardEventStream.SubscribeToShardEventCase => visitor.subscribeToShardEvent(value.subscribeToShardEvent) case value: SubscribeToShardEventStream.ResourceNotFoundExceptionCase => visitor.resourceNotFoundException(value.resourceNotFoundException) case value: SubscribeToShardEventStream.ResourceInUseExceptionCase => visitor.resourceInUseException(value.resourceInUseException) case value: SubscribeToShardEventStream.KMSDisabledExceptionCase => visitor.kMSDisabledException(value.kMSDisabledException) case value: SubscribeToShardEventStream.KMSInvalidStateExceptionCase => visitor.kMSInvalidStateException(value.kMSInvalidStateException) case value: SubscribeToShardEventStream.KMSAccessDeniedExceptionCase => visitor.kMSAccessDeniedException(value.kMSAccessDeniedException) case value: SubscribeToShardEventStream.KMSNotFoundExceptionCase => visitor.kMSNotFoundException(value.kMSNotFoundException) case value: SubscribeToShardEventStream.KMSOptInRequiredCase => visitor.kMSOptInRequired(value.kMSOptInRequired) case value: SubscribeToShardEventStream.KMSThrottlingExceptionCase => visitor.kMSThrottlingException(value.kMSThrottlingException) case value: SubscribeToShardEventStream.InternalFailureExceptionCase => visitor.internalFailureException(value.internalFailureException) } } object SubscribeToShardEventStream extends ShapeTag.Companion[SubscribeToShardEventStream] { /**

After you call SubscribeToShard, Kinesis Data Streams sends events * of this type to your consumer. For an example of how to handle these events, see Enhanced Fan-Out * Using the Kinesis Data Streams API.

*/ def subscribeToShardEvent(subscribeToShardEvent: SubscribeToShardEvent): SubscribeToShardEventStream = SubscribeToShardEventCase(subscribeToShardEvent) def resourceNotFoundException(resourceNotFoundException: ResourceNotFoundException): SubscribeToShardEventStream = ResourceNotFoundExceptionCase(resourceNotFoundException) def resourceInUseException(resourceInUseException: ResourceInUseException): SubscribeToShardEventStream = ResourceInUseExceptionCase(resourceInUseException) def kMSDisabledException(kMSDisabledException: KMSDisabledException): SubscribeToShardEventStream = KMSDisabledExceptionCase(kMSDisabledException) def kMSInvalidStateException(kMSInvalidStateException: KMSInvalidStateException): SubscribeToShardEventStream = KMSInvalidStateExceptionCase(kMSInvalidStateException) def kMSAccessDeniedException(kMSAccessDeniedException: KMSAccessDeniedException): SubscribeToShardEventStream = KMSAccessDeniedExceptionCase(kMSAccessDeniedException) def kMSNotFoundException(kMSNotFoundException: KMSNotFoundException): SubscribeToShardEventStream = KMSNotFoundExceptionCase(kMSNotFoundException) def kMSOptInRequired(kMSOptInRequired: KMSOptInRequired): SubscribeToShardEventStream = KMSOptInRequiredCase(kMSOptInRequired) def kMSThrottlingException(kMSThrottlingException: KMSThrottlingException): SubscribeToShardEventStream = KMSThrottlingExceptionCase(kMSThrottlingException) /**

The processing of the request failed because of an unknown error, exception, or * failure.

*/ def internalFailureException(internalFailureException: InternalFailureException): SubscribeToShardEventStream = InternalFailureExceptionCase(internalFailureException) val id: ShapeId = ShapeId("com.amazonaws.kinesis", "SubscribeToShardEventStream") val hints: Hints = Hints( smithy.api.Documentation("

This is a tagged union for all of the types of events an enhanced fan-out consumer can\n receive over HTTP/2 after a call to SubscribeToShard.

"), smithy.api.Streaming(), ).lazily /**

After you call SubscribeToShard, Kinesis Data Streams sends events * of this type to your consumer. For an example of how to handle these events, see Enhanced Fan-Out * Using the Kinesis Data Streams API.

*/ final case class SubscribeToShardEventCase(subscribeToShardEvent: SubscribeToShardEvent) extends SubscribeToShardEventStream { final def $ordinal: Int = 0 } final case class ResourceNotFoundExceptionCase(resourceNotFoundException: ResourceNotFoundException) extends SubscribeToShardEventStream { final def $ordinal: Int = 1 } final case class ResourceInUseExceptionCase(resourceInUseException: ResourceInUseException) extends SubscribeToShardEventStream { final def $ordinal: Int = 2 } final case class KMSDisabledExceptionCase(kMSDisabledException: KMSDisabledException) extends SubscribeToShardEventStream { final def $ordinal: Int = 3 } final case class KMSInvalidStateExceptionCase(kMSInvalidStateException: KMSInvalidStateException) extends SubscribeToShardEventStream { final def $ordinal: Int = 4 } final case class KMSAccessDeniedExceptionCase(kMSAccessDeniedException: KMSAccessDeniedException) extends SubscribeToShardEventStream { final def $ordinal: Int = 5 } final case class KMSNotFoundExceptionCase(kMSNotFoundException: KMSNotFoundException) extends SubscribeToShardEventStream { final def $ordinal: Int = 6 } final case class KMSOptInRequiredCase(kMSOptInRequired: KMSOptInRequired) extends SubscribeToShardEventStream { final def $ordinal: Int = 7 } final case class KMSThrottlingExceptionCase(kMSThrottlingException: KMSThrottlingException) extends SubscribeToShardEventStream { final def $ordinal: Int = 8 } /**

The processing of the request failed because of an unknown error, exception, or * failure.

*/ final case class InternalFailureExceptionCase(internalFailureException: InternalFailureException) extends SubscribeToShardEventStream { final def $ordinal: Int = 9 } object SubscribeToShardEventCase { val hints: Hints = Hints( smithy.api.Documentation("

After you call SubscribeToShard, Kinesis Data Streams sends events\n of this type to your consumer. For an example of how to handle these events, see Enhanced Fan-Out\n Using the Kinesis Data Streams API.

"), ).lazily val schema: Schema[SubscribeToShardEventStream.SubscribeToShardEventCase] = bijection(SubscribeToShardEvent.schema.addHints(hints), SubscribeToShardEventStream.SubscribeToShardEventCase(_), _.subscribeToShardEvent) val alt = schema.oneOf[SubscribeToShardEventStream]("SubscribeToShardEvent") } object ResourceNotFoundExceptionCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.ResourceNotFoundExceptionCase] = bijection(ResourceNotFoundException.schema.addHints(hints), SubscribeToShardEventStream.ResourceNotFoundExceptionCase(_), _.resourceNotFoundException) val alt = schema.oneOf[SubscribeToShardEventStream]("ResourceNotFoundException") } object ResourceInUseExceptionCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.ResourceInUseExceptionCase] = bijection(ResourceInUseException.schema.addHints(hints), SubscribeToShardEventStream.ResourceInUseExceptionCase(_), _.resourceInUseException) val alt = schema.oneOf[SubscribeToShardEventStream]("ResourceInUseException") } object KMSDisabledExceptionCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.KMSDisabledExceptionCase] = bijection(KMSDisabledException.schema.addHints(hints), SubscribeToShardEventStream.KMSDisabledExceptionCase(_), _.kMSDisabledException) val alt = schema.oneOf[SubscribeToShardEventStream]("KMSDisabledException") } object KMSInvalidStateExceptionCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.KMSInvalidStateExceptionCase] = bijection(KMSInvalidStateException.schema.addHints(hints), SubscribeToShardEventStream.KMSInvalidStateExceptionCase(_), _.kMSInvalidStateException) val alt = schema.oneOf[SubscribeToShardEventStream]("KMSInvalidStateException") } object KMSAccessDeniedExceptionCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.KMSAccessDeniedExceptionCase] = bijection(KMSAccessDeniedException.schema.addHints(hints), SubscribeToShardEventStream.KMSAccessDeniedExceptionCase(_), _.kMSAccessDeniedException) val alt = schema.oneOf[SubscribeToShardEventStream]("KMSAccessDeniedException") } object KMSNotFoundExceptionCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.KMSNotFoundExceptionCase] = bijection(KMSNotFoundException.schema.addHints(hints), SubscribeToShardEventStream.KMSNotFoundExceptionCase(_), _.kMSNotFoundException) val alt = schema.oneOf[SubscribeToShardEventStream]("KMSNotFoundException") } object KMSOptInRequiredCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.KMSOptInRequiredCase] = bijection(KMSOptInRequired.schema.addHints(hints), SubscribeToShardEventStream.KMSOptInRequiredCase(_), _.kMSOptInRequired) val alt = schema.oneOf[SubscribeToShardEventStream]("KMSOptInRequired") } object KMSThrottlingExceptionCase { val hints: Hints = Hints.empty val schema: Schema[SubscribeToShardEventStream.KMSThrottlingExceptionCase] = bijection(KMSThrottlingException.schema.addHints(hints), SubscribeToShardEventStream.KMSThrottlingExceptionCase(_), _.kMSThrottlingException) val alt = schema.oneOf[SubscribeToShardEventStream]("KMSThrottlingException") } object InternalFailureExceptionCase { val hints: Hints = Hints( smithy.api.Documentation("

The processing of the request failed because of an unknown error, exception, or\n failure.

"), ).lazily val schema: Schema[SubscribeToShardEventStream.InternalFailureExceptionCase] = bijection(InternalFailureException.schema.addHints(hints), SubscribeToShardEventStream.InternalFailureExceptionCase(_), _.internalFailureException) val alt = schema.oneOf[SubscribeToShardEventStream]("InternalFailureException") } trait Visitor[A] { def subscribeToShardEvent(value: SubscribeToShardEvent): A def resourceNotFoundException(value: ResourceNotFoundException): A def resourceInUseException(value: ResourceInUseException): A def kMSDisabledException(value: KMSDisabledException): A def kMSInvalidStateException(value: KMSInvalidStateException): A def kMSAccessDeniedException(value: KMSAccessDeniedException): A def kMSNotFoundException(value: KMSNotFoundException): A def kMSOptInRequired(value: KMSOptInRequired): A def kMSThrottlingException(value: KMSThrottlingException): A def internalFailureException(value: InternalFailureException): A } object Visitor { trait Default[A] extends Visitor[A] { def default: A def subscribeToShardEvent(value: SubscribeToShardEvent): A = default def resourceNotFoundException(value: ResourceNotFoundException): A = default def resourceInUseException(value: ResourceInUseException): A = default def kMSDisabledException(value: KMSDisabledException): A = default def kMSInvalidStateException(value: KMSInvalidStateException): A = default def kMSAccessDeniedException(value: KMSAccessDeniedException): A = default def kMSNotFoundException(value: KMSNotFoundException): A = default def kMSOptInRequired(value: KMSOptInRequired): A = default def kMSThrottlingException(value: KMSThrottlingException): A = default def internalFailureException(value: InternalFailureException): A = default } } implicit val schema: Schema[SubscribeToShardEventStream] = union( SubscribeToShardEventStream.SubscribeToShardEventCase.alt, SubscribeToShardEventStream.ResourceNotFoundExceptionCase.alt, SubscribeToShardEventStream.ResourceInUseExceptionCase.alt, SubscribeToShardEventStream.KMSDisabledExceptionCase.alt, SubscribeToShardEventStream.KMSInvalidStateExceptionCase.alt, SubscribeToShardEventStream.KMSAccessDeniedExceptionCase.alt, SubscribeToShardEventStream.KMSNotFoundExceptionCase.alt, SubscribeToShardEventStream.KMSOptInRequiredCase.alt, SubscribeToShardEventStream.KMSThrottlingExceptionCase.alt, SubscribeToShardEventStream.InternalFailureExceptionCase.alt, ){ _.$ordinal }.withId(id).addHints(hints) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy