Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #305 from exoego/kinesis
Browse files Browse the repository at this point in the history
[kinesis] Add sourceKinesisStreamArn &  metadata
  • Loading branch information
exoego authored Dec 22, 2021
2 parents 9c26c8a + 22fe1c2 commit d299ab2
Showing 1 changed file with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import scala.scalajs.js
trait FirehoseTransformationEvent extends js.Object {
var invocationId: String = js.native
var deliveryStreamArn: String = js.native
var sourceKinesisStreamArn: js.UndefOr[String] = js.native
var region: String = js.native
var records: js.Array[FirehoseTransformationEventRecord] = js.native
}
Expand All @@ -15,14 +16,16 @@ object FirehoseTransformationEvent {
invocationId: String,
deliveryStreamArn: String,
region: String,
records: js.Array[FirehoseTransformationEventRecord]
records: js.Array[FirehoseTransformationEventRecord],
sourceKinesisStreamArn: js.UndefOr[String] = js.undefined
): FirehoseTransformationEvent = {
val _obj$ = js.Dynamic.literal(
"invocationId" -> invocationId.asInstanceOf[js.Any],
"deliveryStreamArn" -> deliveryStreamArn.asInstanceOf[js.Any],
"region" -> region.asInstanceOf[js.Any],
"records" -> records.asInstanceOf[js.Any]
)
sourceKinesisStreamArn.foreach(_v => _obj$.updateDynamic("sourceKinesisStreamArn")(_v.asInstanceOf[js.Any]))
_obj$.asInstanceOf[FirehoseTransformationEvent]
}
}
Expand Down Expand Up @@ -80,24 +83,45 @@ object FirehoseRecordMetadata {
}
}

@js.native
trait FirehoseTransformationMetadata extends js.Object {
var partitionKeys: FirehoseTransformationMetadata.PartitionKeys = js.native
}

object FirehoseTransformationMetadata {
type PartitionKeys = js.Dictionary[String]

def apply(
partitionKeys: FirehoseTransformationMetadata.PartitionKeys
): FirehoseTransformationMetadata = {
val _obj$ = js.Dynamic.literal(
"partitionKeys" -> partitionKeys.asInstanceOf[js.Any]
)
_obj$.asInstanceOf[FirehoseTransformationMetadata]
}
}

@js.native
trait FirehoseTransformationResultRecord extends js.Object {
var recordId: String = js.native
var result: literal.FirehoseRecordTransformationStatus = js.native
var data: String = js.native
var metadata: js.UndefOr[FirehoseTransformationMetadata] = js.native
}

object FirehoseTransformationResultRecord {
def apply(
recordId: String,
result: literal.FirehoseRecordTransformationStatus,
data: String
data: String,
metadata: js.UndefOr[FirehoseTransformationMetadata] = js.undefined
): FirehoseTransformationResultRecord = {
val _obj$ = js.Dynamic.literal(
"recordId" -> recordId.asInstanceOf[js.Any],
"result" -> result.asInstanceOf[js.Any],
"data" -> data.asInstanceOf[js.Any]
)
metadata.foreach(_v => _obj$.updateDynamic("metadata")(_v.asInstanceOf[js.Any]))
_obj$.asInstanceOf[FirehoseTransformationResultRecord]
}
}
Expand Down

0 comments on commit d299ab2

Please sign in to comment.