Dataset.fromJson constructor

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

Implementation

factory Dataset.fromJson(Map<String, dynamic> json) {
  return Dataset(
    actions: (json['actions'] as List?)
        ?.whereNotNull()
        .map((e) => DatasetAction.fromJson(e as Map<String, dynamic>))
        .toList(),
    arn: json['arn'] as String?,
    contentDeliveryRules: (json['contentDeliveryRules'] as List?)
        ?.whereNotNull()
        .map((e) =>
            DatasetContentDeliveryRule.fromJson(e as Map<String, dynamic>))
        .toList(),
    creationTime: timeStampFromJson(json['creationTime']),
    lastUpdateTime: timeStampFromJson(json['lastUpdateTime']),
    lateDataRules: (json['lateDataRules'] as List?)
        ?.whereNotNull()
        .map((e) => LateDataRule.fromJson(e as Map<String, dynamic>))
        .toList(),
    name: json['name'] as String?,
    retentionPeriod: json['retentionPeriod'] != null
        ? RetentionPeriod.fromJson(
            json['retentionPeriod'] as Map<String, dynamic>)
        : null,
    status: (json['status'] as String?)?.toDatasetStatus(),
    triggers: (json['triggers'] as List?)
        ?.whereNotNull()
        .map((e) => DatasetTrigger.fromJson(e as Map<String, dynamic>))
        .toList(),
    versioningConfiguration: json['versioningConfiguration'] != null
        ? VersioningConfiguration.fromJson(
            json['versioningConfiguration'] as Map<String, dynamic>)
        : null,
  );
}