NotificationScheme.fromJson constructor
Implementation
factory NotificationScheme.fromJson(Map<String, Object?> json) {
return NotificationScheme(
description: json[r'description'] as String?,
expand: json[r'expand'] as String?,
id: (json[r'id'] as num?)?.toInt(),
name: json[r'name'] as String?,
notificationSchemeEvents:
(json[r'notificationSchemeEvents'] as List<Object?>?)
?.map((i) => NotificationSchemeEvent.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
projects: (json[r'projects'] as List<Object?>?)
?.map((i) => (i as num?)?.toInt() ?? 0)
.toList() ??
[],
scope: json[r'scope'] != null
? Scope.fromJson(json[r'scope']! as Map<String, Object?>)
: null,
self: json[r'self'] as String?,
);
}