ContentRestriction.fromJson constructor
Implementation
factory ContentRestriction.fromJson(Map<String, Object?> json) {
return ContentRestriction(
operation: ContentRestrictionOperation.fromValue(
json[r'operation'] as String? ?? ''),
restrictions: json[r'restrictions'] != null
? ContentRestrictionRestrictions.fromJson(
json[r'restrictions']! as Map<String, Object?>)
: null,
content: json[r'content'] != null
? Content.fromJson(json[r'content']! as Map<String, Object?>)
: null,
expandable: ContentRestrictionExpandable.fromJson(
json[r'_expandable'] as Map<String, Object?>? ?? const {}),
links: GenericLinks.fromJson(
json[r'_links'] as Map<String, Object?>? ?? const {}),
);
}