ContentRestrictionUpdate.fromJson constructor

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

Implementation

factory ContentRestrictionUpdate.fromJson(Map<String, Object?> json) {
  return ContentRestrictionUpdate(
    operation: ContentRestrictionUpdateOperation.fromValue(
        json[r'operation'] as String? ?? ''),
    restrictions: ContentRestrictionUpdateRestrictions.fromJson(
        json[r'restrictions'] as Map<String, Object?>? ?? const {}),
    content: json[r'content'] != null
        ? Content.fromJson(json[r'content']! as Map<String, Object?>)
        : null,
  );
}