toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
if (data != null) 'data': data,
'finished': finished,
'mode': mode,
if (status != null) 'status': _statusToString(status),
if (retryOf != null) 'retryOf': retryOf,
if (retrySuccessId != null) 'retrySuccessId': retrySuccessId,
if (startedAt != null) 'startedAt': startedAt?.toIso8601String(),
if (stoppedAt != null) 'stoppedAt': stoppedAt?.toIso8601String(),
'workflowId': workflowId,
if (waitTill != null) 'waitTill': waitTill?.toIso8601String(),
if (customData != null) 'customData': customData,
if (workflowName != null) 'workflowName': workflowName,
};
}