toJson method
Implementation
@override
Object toJson() => {
if (name.isNotDefault) 'name': name,
'author': author,
if (content case final content?) 'content': content.toJson(),
'invocationId': invocationId,
if (actions case final actions?) 'actions': actions.toJson(),
if (timestamp case final timestamp?) 'timestamp': timestamp.toJson(),
if (errorCode.isNotDefault) 'errorCode': errorCode,
if (errorMessage.isNotDefault) 'errorMessage': errorMessage,
if (eventMetadata case final eventMetadata?)
'eventMetadata': eventMetadata.toJson(),
};