EventNotification.fromJson constructor

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

Implementation

factory EventNotification.fromJson(Map<String, Object?> json) {
  return EventNotification(
    emailAddress: json[r'emailAddress'] as String?,
    expand: json[r'expand'] as String?,
    field: json[r'field'] != null
        ? FieldDetails.fromJson(json[r'field']! as Map<String, Object?>)
        : null,
    group: json[r'group'] != null
        ? GroupName.fromJson(json[r'group']! as Map<String, Object?>)
        : null,
    id: (json[r'id'] as num?)?.toInt(),
    notificationType: json[r'notificationType'] != null
        ? EventNotificationNotificationType.fromValue(
            json[r'notificationType']! as String)
        : null,
    parameter: json[r'parameter'] as String?,
    projectRole: json[r'projectRole'] != null
        ? ProjectRole.fromJson(json[r'projectRole']! as Map<String, Object?>)
        : null,
    recipient: json[r'recipient'] as String?,
    user: json[r'user'] != null
        ? UserDetails.fromJson(json[r'user']! as Map<String, Object?>)
        : null,
  );
}