toJson method
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'command': command,
'requestId': requestId,
'outcome': outcome.name,
if (reason != null) 'reason': reason!.name,
if (confirmation != null) 'confirmation': confirmation!.name,
};