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

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

The newest version!
package com.amazonaws.kinesis

import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.struct

/** 

After you call SubscribeToShard, Kinesis Data Streams sends events * of this type over an HTTP/2 connection to your consumer.

* @param Records *

* @param ContinuationSequenceNumber *

Use this as SequenceNumber in the next call to SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures your * shard progress even when no data is written to the shard.

* @param MillisBehindLatest *

The number of milliseconds the read records are from the tip of the stream, indicating * how far behind current time the consumer is. A value of zero indicates that record * processing is caught up, and there are no new records to process at this moment.

* @param ChildShards *

The list of the child shards of the current shard, returned only at the end of the * current shard.

*/ final case class SubscribeToShardEvent(records: List[Record], continuationSequenceNumber: SequenceNumber, millisBehindLatest: MillisBehindLatest, childShards: Option[List[ChildShard]] = None) object SubscribeToShardEvent extends ShapeTag.Companion[SubscribeToShardEvent] { val id: ShapeId = ShapeId("com.amazonaws.kinesis", "SubscribeToShardEvent") val hints: Hints = Hints( smithy.api.Documentation("

After you call SubscribeToShard, Kinesis Data Streams sends events\n of this type over an HTTP/2 connection to your consumer.

"), ).lazily // constructor using the original order from the spec private def make(records: List[Record], continuationSequenceNumber: SequenceNumber, millisBehindLatest: MillisBehindLatest, childShards: Option[List[ChildShard]]): SubscribeToShardEvent = SubscribeToShardEvent(records, continuationSequenceNumber, millisBehindLatest, childShards) implicit val schema: Schema[SubscribeToShardEvent] = struct( RecordList.underlyingSchema.required[SubscribeToShardEvent]("Records", _.records).addHints(smithy.api.Documentation("

")), SequenceNumber.schema.required[SubscribeToShardEvent]("ContinuationSequenceNumber", _.continuationSequenceNumber).addHints(smithy.api.Documentation("

Use this as SequenceNumber in the next call to SubscribeToShard, with StartingPosition set to\n AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use\n ContinuationSequenceNumber for checkpointing because it captures your\n shard progress even when no data is written to the shard.

")), MillisBehindLatest.schema.required[SubscribeToShardEvent]("MillisBehindLatest", _.millisBehindLatest).addHints(smithy.api.Documentation("

The number of milliseconds the read records are from the tip of the stream, indicating\n how far behind current time the consumer is. A value of zero indicates that record\n processing is caught up, and there are no new records to process at this moment.

")), ChildShardList.underlyingSchema.optional[SubscribeToShardEvent]("ChildShards", _.childShards).addHints(smithy.api.Documentation("

The list of the child shards of the current shard, returned only at the end of the\n current shard.

")), )(make).withId(id).addHints(hints) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy