toJson method
Implementation
Map<String, Object?> toJson() {
var code = this.code;
var elementReference = this.elementReference;
var level = this.level;
var message = this.message;
var type = this.type;
final json = <String, Object?>{};
if (code != null) {
json[r'code'] = code;
}
if (elementReference != null) {
json[r'elementReference'] = elementReference.toJson();
}
if (level != null) {
json[r'level'] = level.value;
}
if (message != null) {
json[r'message'] = message;
}
if (type != null) {
json[r'type'] = type.value;
}
return json;
}