smithy4s.com.amazonaws.kinesis.ListShardsOutput.scala Maven / Gradle / Ivy
Show all versions of kinesis4cats-smithy4s-client_sjs1_3 Show documentation
package com.amazonaws.kinesis
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.struct
/** @param Shards
* An array of JSON objects. Each object represents one shard and specifies the IDs of
* the shard, the shard's parent, and the shard that's adjacent to the shard's parent. Each
* object also contains the starting and ending hash keys and the starting and ending
* sequence numbers for the shard.
* @param NextToken
* When the number of shards in the data stream is greater than the default value for the
* MaxResults
parameter, or if you explicitly specify a value for
* MaxResults
that is less than the number of shards in the data stream,
* the response includes a pagination token named NextToken
. You can specify
* this NextToken
value in a subsequent call to ListShards
to
* list the next set of shards. For more information about the use of this pagination token
* when calling the ListShards
operation, see NextToken.
*
* Tokens expire after 300 seconds. When you obtain a value for
* NextToken
in the response to a call to ListShards
, you
* have 300 seconds to use that value. If you specify an expired token in a call to
* ListShards
, you get ExpiredNextTokenException
.
*
*/
final case class ListShardsOutput(shards: Option[List[Shard]] = None, nextToken: Option[NextToken] = None)
object ListShardsOutput extends ShapeTag.Companion[ListShardsOutput] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "ListShardsOutput")
val hints: Hints = Hints(
smithy.api.Output(),
).lazily
// constructor using the original order from the spec
private def make(shards: Option[List[Shard]], nextToken: Option[NextToken]): ListShardsOutput = ListShardsOutput(shards, nextToken)
implicit val schema: Schema[ListShardsOutput] = struct(
ShardList.underlyingSchema.optional[ListShardsOutput]("Shards", _.shards).addHints(smithy.api.Documentation("An array of JSON objects. Each object represents one shard and specifies the IDs of\n the shard, the shard\'s parent, and the shard that\'s adjacent to the shard\'s parent. Each\n object also contains the starting and ending hash keys and the starting and ending\n sequence numbers for the shard.
")),
NextToken.schema.optional[ListShardsOutput]("NextToken", _.nextToken).addHints(smithy.api.Documentation("When the number of shards in the data stream is greater than the default value for the\n MaxResults
parameter, or if you explicitly specify a value for\n MaxResults
that is less than the number of shards in the data stream,\n the response includes a pagination token named NextToken
. You can specify\n this NextToken
value in a subsequent call to ListShards
to\n list the next set of shards. For more information about the use of this pagination token\n when calling the ListShards
operation, see NextToken.
\n \n Tokens expire after 300 seconds. When you obtain a value for\n NextToken
in the response to a call to ListShards
, you\n have 300 seconds to use that value. If you specify an expired token in a call to\n ListShards
, you get ExpiredNextTokenException
.
\n ")),
)(make).withId(id).addHints(hints)
}