StreamRecord.fromJson constructor

StreamRecord.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory StreamRecord.fromJson(Map<String, dynamic> json) {
  return StreamRecord(
    approximateCreationDateTime:
        timeStampFromJson(json['ApproximateCreationDateTime']),
    keys: (json['Keys'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(k, AttributeValue.fromJson(e as Map<String, dynamic>))),
    newImage: (json['NewImage'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(k, AttributeValue.fromJson(e as Map<String, dynamic>))),
    oldImage: (json['OldImage'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(k, AttributeValue.fromJson(e as Map<String, dynamic>))),
    sequenceNumber: json['SequenceNumber'] as String?,
    sizeBytes: json['SizeBytes'] as int?,
    streamViewType: (json['StreamViewType'] as String?)?.toStreamViewType(),
  );
}