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,
      restrictionDate:
          json_.containsKey('restrictionDate')
              ? core.DateTime.parse(json_['restrictionDate'] as core.String)
              : null,
      systemRestricted: json_['systemRestricted'] as core.bool?,
      type: json_['type'] as core.String?,
    );