toJson method
Implementation
Map<String, Object?> toJson() {
var id = this.id;
var key = this.key;
var value = this.value;
var createdAt = this.createdAt;
var createdBy = this.createdBy;
var version = this.version;
final json = <String, Object?>{};
if (id != null) {
json[r'id'] = id;
}
if (key != null) {
json[r'key'] = key;
}
if (value != null) {
json[r'value'] = value;
}
if (createdAt != null) {
json[r'createdAt'] = createdAt.toIso8601String();
}
if (createdBy != null) {
json[r'createdBy'] = createdBy;
}
if (version != null) {
json[r'version'] = version.toJson();
}
return json;
}