DataRepositoryTask.fromJson constructor

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

Implementation

factory DataRepositoryTask.fromJson(Map<String, dynamic> json) {
  return DataRepositoryTask(
    creationTime:
        nonNullableTimeStampFromJson(json['CreationTime'] as Object),
    fileSystemId: json['FileSystemId'] as String,
    lifecycle: (json['Lifecycle'] as String).toDataRepositoryTaskLifecycle(),
    taskId: json['TaskId'] as String,
    type: (json['Type'] as String).toDataRepositoryTaskType(),
    endTime: timeStampFromJson(json['EndTime']),
    failureDetails: json['FailureDetails'] != null
        ? DataRepositoryTaskFailureDetails.fromJson(
            json['FailureDetails'] as Map<String, dynamic>)
        : null,
    paths: (json['Paths'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    report: json['Report'] != null
        ? CompletionReport.fromJson(json['Report'] as Map<String, dynamic>)
        : null,
    resourceARN: json['ResourceARN'] as String?,
    startTime: timeStampFromJson(json['StartTime']),
    status: json['Status'] != null
        ? DataRepositoryTaskStatus.fromJson(
            json['Status'] as Map<String, dynamic>)
        : null,
    tags: (json['Tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}