ContentRestrictions.fromJson constructor

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

Implementation

factory ContentRestrictions.fromJson(Map<String, Object?> json) {
  return ContentRestrictions(
    read: json[r'read'] != null
        ? ContentRestriction.fromJson(json[r'read']! as Map<String, Object?>)
        : null,
    update: json[r'update'] != null
        ? ContentRestriction.fromJson(
            json[r'update']! as Map<String, Object?>)
        : null,
    expandable: json[r'_expandable'] != null
        ? ContentRestrictionsExpandable.fromJson(
            json[r'_expandable']! as Map<String, Object?>)
        : null,
    links: json[r'_links'] != null
        ? GenericLinks.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
  );
}