toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'_id'] = this.id;
if (this.userId != null) {
json[r'userId'] = this.userId;
} else {
json[r'userId'] = null;
}
if (this.username != null) {
json[r'username'] = this.username;
} else {
json[r'username'] = null;
}
json[r'resourceName'] = this.resourceName;
json[r'crudType'] = this.crudType;
if (this.from != null) {
json[r'from'] = this.from;
} else {
json[r'from'] = null;
}
if (this.url != null) {
json[r'url'] = this.url;
} else {
json[r'url'] = null;
}
if (this.ip != null) {
json[r'ip'] = this.ip;
} else {
json[r'ip'] = null;
}
if (this.when_ != null) {
json[r'when'] = this.when_!.toUtc().toIso8601String();
} else {
json[r'when'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.serverStartDate != null) {
json[r'serverStartDate'] = this.serverStartDate!.toUtc().toIso8601String();
} else {
json[r'serverStartDate'] = null;
}
if (this.objectDetails != null) {
json[r'objectDetails'] = this.objectDetails;
} else {
json[r'objectDetails'] = null;
}
return json;
}