DeliveryStreamDescription.fromJson constructor

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

Implementation

factory DeliveryStreamDescription.fromJson(Map<String, dynamic> json) {
  return DeliveryStreamDescription(
    deliveryStreamARN: json['DeliveryStreamARN'] as String,
    deliveryStreamName: json['DeliveryStreamName'] as String,
    deliveryStreamStatus:
        (json['DeliveryStreamStatus'] as String).toDeliveryStreamStatus(),
    deliveryStreamType:
        (json['DeliveryStreamType'] as String).toDeliveryStreamType(),
    destinations: (json['Destinations'] as List)
        .whereNotNull()
        .map(
            (e) => DestinationDescription.fromJson(e as Map<String, dynamic>))
        .toList(),
    hasMoreDestinations: json['HasMoreDestinations'] as bool,
    versionId: json['VersionId'] as String,
    createTimestamp: timeStampFromJson(json['CreateTimestamp']),
    deliveryStreamEncryptionConfiguration:
        json['DeliveryStreamEncryptionConfiguration'] != null
            ? DeliveryStreamEncryptionConfiguration.fromJson(
                json['DeliveryStreamEncryptionConfiguration']
                    as Map<String, dynamic>)
            : null,
    failureDescription: json['FailureDescription'] != null
        ? FailureDescription.fromJson(
            json['FailureDescription'] as Map<String, dynamic>)
        : null,
    lastUpdateTimestamp: timeStampFromJson(json['LastUpdateTimestamp']),
    source: json['Source'] != null
        ? SourceDescription.fromJson(json['Source'] as Map<String, dynamic>)
        : null,
  );
}