scala.com.amazonaws.kinesis.PutRecordInput.scala Maven / Gradle / Ivy
Show all versions of kinesis4cats-smithy4s-client_3 Show documentation
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 PutRecord
.
* @param StreamARN
* The ARN of the stream.
* @param ExplicitHashKey
* The hash value used to explicitly determine the shard the data record is assigned to
* by overriding the partition key hash.
* @param PartitionKey
* Determines which shard in the stream the data record is assigned to. Partition keys
* are Unicode strings with a maximum length limit of 256 characters for each key. Amazon
* Kinesis Data Streams uses the partition key as input to a hash function that maps the
* partition key and associated data to a specific shard. Specifically, an MD5 hash
* function is used to map partition keys to 128-bit integer values and to map associated
* data records to shards. As a result of this hashing mechanism, all data records with the
* same partition key map to the same shard within the stream.
* @param SequenceNumberForOrdering
* Guarantees strictly increasing sequence numbers, for puts from the same client and to
* the same partition key. Usage: set the SequenceNumberForOrdering
of record
* n to the sequence number of record n-1 (as
* returned in the result when putting record n-1). If this parameter
* is not set, records are coarsely ordered based on arrival time.
* @param StreamName
* The name of the stream to put the data record into.
* @param Data
* The data blob to put into the record, which is base64-encoded when the blob is
* serialized. When the data blob (the payload before base64-encoding) is added to the
* partition key size, the total size must not exceed the maximum record size (1
* MiB).
*/
final case class PutRecordInput(data: Data, partitionKey: PartitionKey, streamName: Option[StreamName] = None, explicitHashKey: Option[HashKey] = None, sequenceNumberForOrdering: Option[SequenceNumber] = None, streamARN: Option[StreamARN] = None)
object PutRecordInput extends ShapeTag.Companion[PutRecordInput] {
val id: ShapeId = ShapeId("com.amazonaws.kinesis", "PutRecordInput")
val hints: Hints = Hints(
smithy.api.Documentation("Represents the input for PutRecord
.
"),
smithy.api.Input(),
)
implicit val schema: Schema[PutRecordInput] = struct(
Data.schema.required[PutRecordInput]("Data", _.data).addHints(smithy.api.Documentation("The data blob to put into the record, which is base64-encoded when the blob is\n serialized. When the data blob (the payload before base64-encoding) is added to the\n partition key size, the total size must not exceed the maximum record size (1\n MiB).
")),
PartitionKey.schema.required[PutRecordInput]("PartitionKey", _.partitionKey).addHints(smithy.api.Documentation("Determines which shard in the stream the data record is assigned to. Partition keys\n are Unicode strings with a maximum length limit of 256 characters for each key. Amazon\n Kinesis Data Streams uses the partition key as input to a hash function that maps the\n partition key and associated data to a specific shard. Specifically, an MD5 hash\n function is used to map partition keys to 128-bit integer values and to map associated\n data records to shards. As a result of this hashing mechanism, all data records with the\n same partition key map to the same shard within the stream.
")),
StreamName.schema.optional[PutRecordInput]("StreamName", _.streamName).addHints(smithy.api.Documentation("The name of the stream to put the data record into.
")),
HashKey.schema.optional[PutRecordInput]("ExplicitHashKey", _.explicitHashKey).addHints(smithy.api.Documentation("The hash value used to explicitly determine the shard the data record is assigned to\n by overriding the partition key hash.
")),
SequenceNumber.schema.optional[PutRecordInput]("SequenceNumberForOrdering", _.sequenceNumberForOrdering).addHints(smithy.api.Documentation("Guarantees strictly increasing sequence numbers, for puts from the same client and to\n the same partition key. Usage: set the SequenceNumberForOrdering
of record\n n to the sequence number of record n-1 (as\n returned in the result when putting record n-1). If this parameter\n is not set, records are coarsely ordered based on arrival time.
")),
StreamARN.schema.optional[PutRecordInput]("StreamARN", _.streamARN).addHints(smithy.api.Documentation("The ARN of the stream.
")),
){
PutRecordInput.apply
}.withId(id).addHints(hints)
}