AuditRecordBean.fromJson constructor

AuditRecordBean.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory AuditRecordBean.fromJson(Map<String, Object?> json) {
  return AuditRecordBean(
    associatedItems: (json[r'associatedItems'] as List<Object?>?)
            ?.map((i) => AssociatedItemBean.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    authorKey: json[r'authorKey'] as String?,
    category: json[r'category'] as String?,
    changedValues: (json[r'changedValues'] as List<Object?>?)
            ?.map((i) => ChangedValueBean.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    created: DateTime.tryParse(json[r'created'] as String? ?? ''),
    description: json[r'description'] as String?,
    eventSource: json[r'eventSource'] as String?,
    id: (json[r'id'] as num?)?.toInt(),
    objectItem: json[r'objectItem'] != null
        ? AssociatedItemBean.fromJson(
            json[r'objectItem']! as Map<String, Object?>)
        : null,
    remoteAddress: json[r'remoteAddress'] as String?,
    summary: json[r'summary'] as String?,
  );
}