smithy4s.com.amazonaws.kinesis.SplitShardInput.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
/** Represents the input for SplitShard
.
* @param StreamName
* The name of the stream for the shard split.
* @param ShardToSplit
* The shard ID of the shard to split.
* @param NewStartingHashKey
* A hash key value for the starting hash key of one of the child shards created by the
* split. The hash key range for a given shard constitutes a set of ordered contiguous
* positive integers. The value for NewStartingHashKey
must be in the range of
* hash keys being mapped into the shard. The NewStartingHashKey
hash key
* value and all higher hash key values in hash key range are distributed to one of the
* child shards. All the lower hash key values in the range are distributed to the other
* child shard.
* @param StreamARN
* The ARN of the stream.
*/
final case class SplitShardInput(shardToSplit: ShardId, newStartingHashKey: HashKey, streamName: Option[StreamName] = None, streamARN: Option[StreamARN] = None)
object SplitShardInput extends ShapeTag.Companion[SplitShardInput] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "SplitShardInput")
val hints: Hints = Hints(
smithy.api.Documentation("Represents the input for SplitShard
.
"),
smithy.api.Input(),
).lazily
// constructor using the original order from the spec
private def make(streamName: Option[StreamName], shardToSplit: ShardId, newStartingHashKey: HashKey, streamARN: Option[StreamARN]): SplitShardInput = SplitShardInput(shardToSplit, newStartingHashKey, streamName, streamARN)
implicit val schema: Schema[SplitShardInput] = struct(
StreamName.schema.optional[SplitShardInput]("StreamName", _.streamName).addHints(smithy.api.Documentation("The name of the stream for the shard split.
")),
ShardId.schema.required[SplitShardInput]("ShardToSplit", _.shardToSplit).addHints(smithy.api.Documentation("The shard ID of the shard to split.
")),
HashKey.schema.required[SplitShardInput]("NewStartingHashKey", _.newStartingHashKey).addHints(smithy.api.Documentation("A hash key value for the starting hash key of one of the child shards created by the\n split. The hash key range for a given shard constitutes a set of ordered contiguous\n positive integers. The value for NewStartingHashKey
must be in the range of\n hash keys being mapped into the shard. The NewStartingHashKey
hash key\n value and all higher hash key values in hash key range are distributed to one of the\n child shards. All the lower hash key values in the range are distributed to the other\n child shard.
")),
StreamARN.schema.optional[SplitShardInput]("StreamARN", _.streamARN).addHints(smithy.api.Documentation("The ARN of the stream.
")),
)(make).withId(id).addHints(hints)
}