AddContentRestrictionRestrictions.fromJson constructor

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

Implementation

factory AddContentRestrictionRestrictions.fromJson(
    Map<String, Object?> json) {
  return AddContentRestrictionRestrictions(
    user: (json[r'user'] as List<Object?>?)
            ?.map((i) => AddContentRestrictionRestrictionsUserItem.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    group: (json[r'group'] as List<Object?>?)
            ?.map((i) => AddContentRestrictionRestrictionsGroupItem.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}