ContentRestriction.fromJson constructor

ContentRestriction.fromJson(
  1. Map json_
)

Implementation

ContentRestriction.fromJson(core.Map json_)
  : this(
      ownerRestricted: json_['ownerRestricted'] as core.bool?,
      readOnly: json_['readOnly'] as core.bool?,
      reason: json_['reason'] as core.String?,
      restrictingUser: json_.containsKey('restrictingUser')
          ? User.fromJson(
              json_['restrictingUser'] as core.Map<core.String, core.dynamic>,
            )
          : null,
      restrictionTime: json_.containsKey('restrictionTime')
          ? core.DateTime.parse(json_['restrictionTime'] as core.String)
          : null,
      systemRestricted: json_['systemRestricted'] as core.bool?,
      type: json_['type'] as core.String?,
    );