SpacePermissionV2.fromJson constructor

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

Implementation

factory SpacePermissionV2.fromJson(Map<String, Object?> json) {
  return SpacePermissionV2(
    id: (json[r'id'] as num?)?.toInt() ?? 0,
    subject: PermissionSubject.fromJson(
        json[r'subject'] as Map<String, Object?>? ?? const {}),
    operation: SpacePermissionV2Operation.fromJson(
        json[r'operation'] as Map<String, Object?>? ?? const {}),
    links: json[r'_links'] != null
        ? GenericLinks.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
  );
}