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