toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
if (this.routineId != null) {
json[r'routineId'] = this.routineId;
} else {
json[r'routineId'] = null;
}
if (this.status != null) {
json[r'status'] = this.status;
} else {
json[r'status'] = null;
}
if (this.progress != null) {
json[r'progress'] = this.progress;
} else {
json[r'progress'] = null;
}
json[r'metadata'] = this.metadata;
if (this.startedAt != null) {
json[r'startedAt'] = this.startedAt!.toUtc().toIso8601String();
} else {
json[r'startedAt'] = null;
}
if (this.completedAt != null) {
json[r'completedAt'] = this.completedAt!.toUtc().toIso8601String();
} else {
json[r'completedAt'] = null;
}
return json;
}