ExportJobResponse.fromJson constructor

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

Implementation

factory ExportJobResponse.fromJson(Map<String, dynamic> json) {
  return ExportJobResponse(
    applicationId: json['ApplicationId'] as String,
    creationDate: json['CreationDate'] as String,
    definition: ExportJobResource.fromJson(
        json['Definition'] as Map<String, dynamic>),
    id: json['Id'] as String,
    jobStatus: (json['JobStatus'] as String).toJobStatus(),
    type: json['Type'] as String,
    completedPieces: json['CompletedPieces'] as int?,
    completionDate: json['CompletionDate'] as String?,
    failedPieces: json['FailedPieces'] as int?,
    failures: (json['Failures'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    totalFailures: json['TotalFailures'] as int?,
    totalPieces: json['TotalPieces'] as int?,
    totalProcessed: json['TotalProcessed'] as int?,
  );
}