WorkflowRun.fromJson constructor

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

Implementation

factory WorkflowRun.fromJson(Map<String, dynamic> json) {
  return WorkflowRun(
    completedOn: timeStampFromJson(json['CompletedOn']),
    errorMessage: json['ErrorMessage'] as String?,
    graph: json['Graph'] != null
        ? WorkflowGraph.fromJson(json['Graph'] as Map<String, dynamic>)
        : null,
    name: json['Name'] as String?,
    previousRunId: json['PreviousRunId'] as String?,
    startedOn: timeStampFromJson(json['StartedOn']),
    statistics: json['Statistics'] != null
        ? WorkflowRunStatistics.fromJson(
            json['Statistics'] as Map<String, dynamic>)
        : null,
    status: (json['Status'] as String?)?.toWorkflowRunStatus(),
    workflowRunId: json['WorkflowRunId'] as String?,
    workflowRunProperties:
        (json['WorkflowRunProperties'] as Map<String, dynamic>?)
            ?.map((k, e) => MapEntry(k, e as String)),
  );
}