smithy4s.com.amazonaws.kinesis.HashKeyRange.scala Maven / Gradle / Ivy
package com.amazonaws.kinesis
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.struct
/** The range of possible hash key values for the shard, which is a set of ordered
* contiguous positive integers.
* @param StartingHashKey
* The starting hash key of the hash key range.
* @param EndingHashKey
* The ending hash key of the hash key range.
*/
final case class HashKeyRange(startingHashKey: HashKey, endingHashKey: HashKey)
object HashKeyRange extends ShapeTag.Companion[HashKeyRange] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "HashKeyRange")
val hints: Hints = Hints(
smithy.api.Documentation("The range of possible hash key values for the shard, which is a set of ordered\n contiguous positive integers.
"),
).lazily
// constructor using the original order from the spec
private def make(startingHashKey: HashKey, endingHashKey: HashKey): HashKeyRange = HashKeyRange(startingHashKey, endingHashKey)
implicit val schema: Schema[HashKeyRange] = struct(
HashKey.schema.required[HashKeyRange]("StartingHashKey", _.startingHashKey).addHints(smithy.api.Documentation("The starting hash key of the hash key range.
")),
HashKey.schema.required[HashKeyRange]("EndingHashKey", _.endingHashKey).addHints(smithy.api.Documentation("The ending hash key of the hash key range.
")),
)(make).withId(id).addHints(hints)
}