SharePermission.fromJson constructor

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

Implementation

factory SharePermission.fromJson(Map<String, Object?> json) {
  return SharePermission(
    group: json[r'group'] != null
        ? GroupName.fromJson(json[r'group']! as Map<String, Object?>)
        : null,
    id: (json[r'id'] as num?)?.toInt(),
    project: json[r'project'] != null
        ? Project.fromJson(json[r'project']! as Map<String, Object?>)
        : null,
    role: json[r'role'] != null
        ? ProjectRole.fromJson(json[r'role']! as Map<String, Object?>)
        : null,
    type: SharePermissionType.fromValue(json[r'type'] as String? ?? ''),
    user: json[r'user'] != null
        ? UserBean.fromJson(json[r'user']! as Map<String, Object?>)
        : null,
  );
}