Execution.fromJson constructor

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

Implementation

factory Execution.fromJson(Map<String, dynamic> json) {
  return Execution(
    id: json['id'] ?? 0,
    data: Map<String, dynamic>.from(json['data'] ?? {}),
    finished: json['finished'] ?? false,
    mode: json['mode'] ?? '',
    retryOf: json['retryOf'],
    retrySuccessId: json['retrySuccessId'],
    startedAt: json['startedAt'] != null ? DateTime.parse(json['startedAt']) : null,
    stoppedAt: json['stoppedAt'] != null ? DateTime.parse(json['stoppedAt']) : null,
    workflowId: json['workflowId'] ?? 0,
    waitTill: json['waitTill'] != null ? DateTime.parse(json['waitTill']) : null,
    customData: json['customData'] != null ? Map<String, dynamic>.from(json['customData']) : null,
  );
}