toJson method
Implementation
Map<String, dynamic> toJson() {
final id = this.id;
final startTimestamp = this.startTimestamp;
final duration = this.duration;
final stopTimestamp = this.stopTimestamp;
return {
'Id': id,
'StartTimestamp': startTimestamp,
if (duration != null) 'Duration': duration,
if (stopTimestamp != null) 'StopTimestamp': stopTimestamp,
};
}