StreamDescription.fromJson constructor

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

Implementation

factory StreamDescription.fromJson(Map<String, dynamic> json) {
  return StreamDescription(
    enhancedMonitoring: (json['EnhancedMonitoring'] as List)
        .whereNotNull()
        .map((e) => EnhancedMetrics.fromJson(e as Map<String, dynamic>))
        .toList(),
    hasMoreShards: json['HasMoreShards'] as bool,
    retentionPeriodHours: json['RetentionPeriodHours'] as int,
    shards: (json['Shards'] as List)
        .whereNotNull()
        .map((e) => Shard.fromJson(e as Map<String, dynamic>))
        .toList(),
    streamARN: json['StreamARN'] as String,
    streamCreationTimestamp: nonNullableTimeStampFromJson(
        json['StreamCreationTimestamp'] as Object),
    streamName: json['StreamName'] as String,
    streamStatus: (json['StreamStatus'] as String).toStreamStatus(),
    encryptionType: (json['EncryptionType'] as String?)?.toEncryptionType(),
    keyId: json['KeyId'] as String?,
  );
}